projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82cb462
)
Support realloc() on a NULL pointer properly (printf(%p) on a NULL pointer
author
Daniel Stenberg
<daniel@haxx.se>
Thu, 4 Aug 2005 23:05:36 +0000
(23:05 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Thu, 4 Aug 2005 23:05:36 +0000
(23:05 +0000)
outputs (nil) and not a 0x0 or similar.
tests/memanalyze.pl
patch
|
blob
|
history
diff --git
a/tests/memanalyze.pl
b/tests/memanalyze.pl
index
b8f17b5
..
b6bc967
100755
(executable)
--- a/
tests/memanalyze.pl
+++ b/
tests/memanalyze.pl
@@
-158,10
+158,8
@@
while(<FILE>) {
$getmem{$addr}="$source:$linenum";
}
- elsif($function =~ /realloc\(0x([0-9a-f]*), (\d*)\) = 0x([0-9a-f]*)/) {
- $oldaddr = $1;
- $newsize = $2;
- $newaddr = $3;
+ elsif($function =~ /realloc\((\(nil\)|0x([0-9a-f]*)), (\d*)\) = 0x([0-9a-f]*)/) {
+ my ($oldaddr, $newsize, $newaddr) = ($2, $3, $4);
$totalmem -= $sizeataddr{$oldaddr};
if($trace) {