don't call the typemap with value 0
authorbdemsky <bdemsky>
Mon, 10 Oct 2005 02:49:22 +0000 (02:49 +0000)
committerbdemsky <bdemsky>
Mon, 10 Oct 2005 02:49:22 +0000 (02:49 +0000)
Repair/RepairCompiler/MCC/CRuntime/instrument.c

index ab5db1e..dd1ccc0 100755 (executable)
@@ -24,7 +24,9 @@ void *ourmalloc(size_t size) {
 }
 
 void ourfree(void *ptr) {
-  typemapdeallocate(memmap, ptr);
+  if (ptr!=NULL) {
+    typemapdeallocate(memmap, ptr);
+  }
   free(ptr);
 }