]> xenbits.xensource.com Git - freebsd.git/commitdiff
loader: revert r352421
authortsoome <tsoome@FreeBSD.org>
Tue, 17 Sep 2019 16:16:46 +0000 (16:16 +0000)
committertsoome <tsoome@FreeBSD.org>
Tue, 17 Sep 2019 16:16:46 +0000 (16:16 +0000)
As insisted by kib, malloc(0) is quite legal.

stand/libsa/zalloc_malloc.c

index 17c1648e05e36bd0a4f1f87362861b0f7df1fce2..98e28b8ef7f5a06631006af1390446692975639b 100644 (file)
@@ -73,9 +73,6 @@ Malloc_align(size_t bytes, size_t alignment)
 {
        Guard *res;
 
-       if (bytes == 0)
-               return (NULL);
-
 #ifdef USEENDGUARD
        bytes += MALLOCALIGN + 1;
 #else