mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:27:20 +03:00
Support realloc() on a NULL pointer properly (printf(%p) on a NULL pointer
outputs (nil) and not a 0x0 or similar.
This commit is contained in:
parent
82cb462bb4
commit
6508d446e1
1 changed files with 2 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue