mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05: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
@ -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…
Reference in New Issue
Block a user