X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fbigalloc.c;h=3133170e5f6921dd86e5aaa893a0b3769c411a64;hb=dbe3b315edac25079fcbfe4df20e80b534f2a7a1;hp=7532a446239bb11b320455a7059f63053c8be306;hpb=a4fe009d3366b0a3e119713b0ecc7fc0070efdfa;p=libucw.git diff --git a/ucw/bigalloc.c b/ucw/bigalloc.c index 7532a446..3133170e 100644 --- a/ucw/bigalloc.c +++ b/ucw/bigalloc.c @@ -17,6 +17,8 @@ void * page_alloc(u64 len) { + if (!len) + return NULL; if (len > SIZE_MAX) die("page_alloc: Size %llu is too large for the current architecture", (long long) len); ASSERT(!(len & (CPU_PAGE_SIZE-1)));