diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2006-04-10 20:39:14 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2006-04-10 20:39:14 +0000 |
commit | 34bcf8050e56fc799efb1013cb92ba1b44bd6df1 (patch) | |
tree | 5ce5628d3b92c6bad19099dcd2ab4bc2fd2d7c9f | |
parent | 86d63135607fbad7f9821124c8b6ca34d02a001c (diff) |
support free(NULL), which is valid ANSI C
-rw-r--r-- | DebugMemory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/DebugMemory.c b/DebugMemory.c index 8f28af61..6e5156db 100644 --- a/DebugMemory.c +++ b/DebugMemory.c @@ -141,6 +141,8 @@ void DebugMemory_registerAllocation(void* data, char* file, int line) { } void DebugMemory_registerDeallocation(void* data, char* file, int line) { + if (!data) + return; assert(singleton); assert(singleton->first); DebugMemoryItem* walk = singleton->first; |