fix
authorChristian Grothoff <christian@grothoff.org>
Sat, 13 Aug 2011 09:32:53 +0000 (09:32 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 13 Aug 2011 09:32:53 +0000 (09:32 +0000)
src/util/common_allocation.c

index 1ae01ca49f43b4a5885ddab3ceabcef1fd2abbfa..40ffe8c61b23217c7de383a760cacad79110d0e6 100644 (file)
@@ -165,7 +165,7 @@ GNUNET_xrealloc_ (void *ptr,
   mem_used = mem_used - *((size_t *) ptr) + n;
 #endif
   ptr = realloc (ptr, n);
-  if (!ptr)
+  if ( (NULL == ptr) && (n > 0) )
     {
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "realloc");
       abort ();