mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:13:31 +03:00
memanalyze.pl: fix getaddrinfo/freeaddrinfo checks
It did not parse them correctly. Problem never shows before we don't run torture tests with these functions - yet. Seen when enabling torture tests with the threaded resolver. Closes #17503
This commit is contained in:
parent
83c90e5047
commit
70115763c3
1 changed files with 5 additions and 4 deletions
|
|
@ -343,7 +343,7 @@ while(<$fileh>) {
|
|||
$function = $3;
|
||||
|
||||
if($function =~ /getaddrinfo\(\) = (\(nil\)|0x([0-9a-f]*))/) {
|
||||
my $add = $2;
|
||||
my $add = $1;
|
||||
if($add eq "(nil)") {
|
||||
;
|
||||
}
|
||||
|
|
@ -357,12 +357,13 @@ while(<$fileh>) {
|
|||
}
|
||||
}
|
||||
# fclose(0x1026c8)
|
||||
elsif($function =~ /freeaddrinfo\(0x([0-9a-f]*)\)/) {
|
||||
if(!$addrinfo{$1}) {
|
||||
elsif($function =~ /freeaddrinfo\((0x[0-9a-f]*)\)/) {
|
||||
my $addr = $1;
|
||||
if(!$addrinfo{$addr}) {
|
||||
print "freeaddrinfo() without getaddrinfo(): $line\n";
|
||||
}
|
||||
else {
|
||||
$addrinfo{$1}=0;
|
||||
$addrinfo{$addr}=0;
|
||||
$addrinfos--;
|
||||
}
|
||||
if($trace) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue