From: bdemsky Date: Mon, 10 Oct 2005 02:49:22 +0000 (+0000) Subject: don't call the typemap with value 0 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=commitdiff_plain;h=1cd12e2adeb9468c7d22a8ce9225025fd0a2d001;ds=sidebyside don't call the typemap with value 0 --- diff --git a/Repair/RepairCompiler/MCC/CRuntime/instrument.c b/Repair/RepairCompiler/MCC/CRuntime/instrument.c index ab5db1e..dd1ccc0 100755 --- a/Repair/RepairCompiler/MCC/CRuntime/instrument.c +++ b/Repair/RepairCompiler/MCC/CRuntime/instrument.c @@ -24,7 +24,9 @@ void *ourmalloc(size_t size) { } void ourfree(void *ptr) { - typemapdeallocate(memmap, ptr); + if (ptr!=NULL) { + typemapdeallocate(memmap, ptr); + } free(ptr); }