aboutsummaryrefslogtreecommitdiff
path: root/tests/memanalyze.pl
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-07-29 13:25:52 +0200
committerYang Tse <yangsita@gmail.com>2011-07-29 13:27:10 +0200
commitbcbac913d65275cc9e22534a8b4cda6994b75977 (patch)
treece057b99e26849afbf3421790dd9fe54134bf1d2 /tests/memanalyze.pl
parent5cdbfa1837394c3ac06828c8322d1441b084aec1 (diff)
socketpair() usage tracking to allow fd leak detection
Diffstat (limited to 'tests/memanalyze.pl')
-rwxr-xr-xtests/memanalyze.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/memanalyze.pl b/tests/memanalyze.pl
index 2650590a6..bf5393365 100755
--- a/tests/memanalyze.pl
+++ b/tests/memanalyze.pl
@@ -236,6 +236,14 @@ while(<FILE>) {
$getfile{$1}="$source:$linenum";
$openfile++;
}
+ elsif($function =~ /socketpair\(\) = (\d*) (\d*)/) {
+ $filedes{$1}=1;
+ $getfile{$1}="$source:$linenum";
+ $openfile++;
+ $filedes{$2}=1;
+ $getfile{$2}="$source:$linenum";
+ $openfile++;
+ }
elsif($function =~ /accept\(\) = (\d*)/) {
$filedes{$1}=1;
$getfile{$1}="$source:$linenum";