]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
utils: fix invalid assertion in xrealloc()
authorPatrick McHardy <kaber@trash.net>
Tue, 6 Jul 2010 03:57:21 +0000 (05:57 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 6 Jul 2010 03:57:21 +0000 (05:57 +0200)
The pointer is allowed to have the value NULL.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/utils.c

index dcb1c8c62d2e925bec6736ec8af1253ab2322a39..96ff4192a0d70c3d2025e54b42abf4f5cdc35ea9 100644 (file)
@@ -41,7 +41,6 @@ void *xmalloc(size_t size)
 
 void *xrealloc(void *ptr, size_t size)
 {
-       assert(ptr != NULL);
        ptr = realloc(ptr, size);
        if (ptr == NULL && size != 0)
                memory_allocation_error();