From: Daniel Stenberg Date: Fri, 7 May 2004 18:54:09 +0000 (+0000) Subject: James Bursa's fix to make this deal with malloc(0) as OK to free() X-Git-Tag: curl-7_12_0~159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=686ba8412879a816479b840a0c811cd2d77bccf9;p=thirdparty%2Fcurl.git James Bursa's fix to make this deal with malloc(0) as OK to free() --- diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl index 743b716293..169c0fe2a0 100755 --- a/tests/memanalyze.pl +++ b/tests/memanalyze.pl @@ -88,7 +88,7 @@ while() { if($function =~ /free\(0x([0-9a-f]*)/) { $addr = $1; - if($sizeataddr{$addr} == 0) { + if(!exists $sizeataddr{$addr}) { print "FREE ERROR: No memory allocated: $line\n"; } elsif(-1 == $sizeataddr{$addr}) {