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:
Daniel Stenberg 2025-05-31 23:25:39 +02:00
parent 83c90e5047
commit 70115763c3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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) {