Permalink
Browse files

tests/valgrind.pm: suppress memleaks of NSS_InitContext()

  • Loading branch information...
1 parent 7d4ed0b commit 4c385cf8960c05c33a2b7d68f6aaced462759cbc @kdudka kdudka committed Apr 16, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/valgrind.pm
View
@@ -36,6 +36,7 @@ sub valgrindparse {
my @o;
my $bt=0;
+ my $nssinit=0;
open(VAL, "<$file");
while(<VAL>) {
@@ -53,9 +54,14 @@ sub valgrindparse {
$us++;
} #else {print "Not our source: $func, $source, $line\n";}
}
+
+ # the memory leakage within NSS_InitContext is not a bug of curl
+ if($w =~ /NSS_InitContext/) {
+ $nssinit++;
+ }
}
else {
- if($us) {
+ if($us and not $nssinit) {
# the stack trace included source details about us
$error++;
@@ -71,6 +77,7 @@ sub valgrindparse {
}
$bt = 0; # no more backtrace
$us = 0;
+ $nssinit = 0;
}
}
else {

0 comments on commit 4c385cf

Please sign in to comment.