aboutsummaryrefslogtreecommitdiff
path: root/tests/memanalyze.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/memanalyze.pl')
-rwxr-xr-xtests/memanalyze.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index 54117f8ea..701cf161c 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -108,9 +108,12 @@ while(<FILE>) {
$linenum = $2;
$function = $3;
- if($function =~ /free\(0x([0-9a-f]*)/) {
- $addr = $1;
- if(!exists $sizeataddr{$addr}) {
+ if($function =~ /free\((\(nil\)|0x([0-9a-f]*))/) {
+ $addr = $2;
+ if($1 eq "(nil)") {
+ ; # do nothing when free(NULL)
+ }
+ elsif(!exists $sizeataddr{$addr}) {
print "FREE ERROR: No memory allocated: $line\n";
}
elsif(-1 == $sizeataddr{$addr}) {