summaryrefslogtreecommitdiffhomepage
path: root/src/heap.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2003-06-26 18:14:13 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2003-06-26 18:14:13 +0000
commit2736a19518f589f2f5d9ae5f6a7e95b561cd112b (patch)
tree4f0f692c6a4030ca3b4cf8587e99e47fbabdf1b1 /src/heap.c
parent93ac7d8824891bc737c265c833df40d2a168d215 (diff)
(debugging_free): Rather than assert on a NULL pointer, log the NULL
pointer and return.
Diffstat (limited to 'src/heap.c')
-rw-r--r--src/heap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/heap.c b/src/heap.c
index 428c853..167147a 100644
--- a/src/heap.c
+++ b/src/heap.c
@@ -1,4 +1,4 @@
-/* $Id: heap.c,v 1.5 2002-07-09 18:52:32 rjkaes Exp $
+/* $Id: heap.c,v 1.6 2003-06-26 18:14:13 rjkaes Exp $
*
* Debugging versions of various heap related functions are combined
* here. The debugging versions include assertions and also print
@@ -67,10 +67,10 @@ debugging_realloc(void *ptr, size_t size, const char *file, unsigned long line)
void
debugging_free(void *ptr, const char *file, unsigned long line)
{
- assert(ptr != NULL);
-
fprintf(stderr, "{free: %p} %s:%lu\n", ptr, file, line);
- free(ptr);
+
+ if (ptr != NULL)
+ free(ptr);
return;
}