tests/valgrind.pm: fix warnings with no valgrind report to show

"readline() on closed filehandle $val at valgrind.pm line 45."

Closes #14977
This commit is contained in:
Daniel Stenberg 2024-09-20 08:50:22 +02:00
parent df5ad100f5
commit fcbe930ef6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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