From: Patrick McHardy Date: Tue, 6 Jul 2010 03:57:21 +0000 (+0200) Subject: utils: fix invalid assertion in xrealloc() X-Git-Tag: v0.099~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b20ba656ba7de066d4dcf5ebeef605e6acc7e01d;p=thirdparty%2Fnftables.git utils: fix invalid assertion in xrealloc() The pointer is allowed to have the value NULL. Signed-off-by: Patrick McHardy --- diff --git a/src/utils.c b/src/utils.c index dcb1c8c6..96ff4192 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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();