]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/valgrind.pm: fix warnings with no valgrind report to show
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2024 06:50:22 +0000 (08:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Sep 2024 13:40:07 +0000 (15:40 +0200)
"readline() on closed filehandle $val at valgrind.pm line 45."

Closes #14977

tests/valgrind.pm

index a0bce30c8b33b629047e282d0dd82b9a3bb5248a..95d08a05fe970bff7c7bd8394cb3e94ea0871421 100644 (file)
@@ -41,7 +41,8 @@ use File::Basename;
 sub valgrindparse {
     my ($file) = @_;
     my @o;
-    open(my $val, "<", "$file");
+    open(my $val, "<", "$file") ||
+        return;
     @o = <$val>;
     close($val);
     return @o;