From: Martin Mares Date: Tue, 2 Sep 2008 21:16:49 +0000 (+0200) Subject: res_malloc() fails if there is no respool active. X-Git-Tag: v5.0~74^2~40 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b628e2be336b06c930ab0566db61d9071db8c96f;p=libucw.git res_malloc() fails if there is no respool active. --- diff --git a/ucw/res-mem.c b/ucw/res-mem.c index 7eee5827..b65b9169 100644 --- a/ucw/res-mem.c +++ b/ucw/res-mem.c @@ -44,6 +44,7 @@ res_malloc(size_t size, struct resource **ptr) { void *p = xmalloc(size); struct resource *r = res_new(&mem_res_class, p); + ASSERT(r); ((struct res_mem *) r) -> size = size; if (ptr) *ptr = r;