]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix Perl warning
authorViktor Szakats <commit@vsz.me>
Mon, 1 Dec 2025 20:07:56 +0000 (21:07 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 1 Dec 2025 20:32:10 +0000 (21:32 +0100)
```
Use of uninitialized value $cmdhash{"option"} in pattern match (m//) at tests/runtests.pl line 1753.
```
Ref: https://github.com/curl/curl/actions/runs/19833947198/job/56831923295?pr=19794#step:13:3694

Follow-up to 02aa75a8c240af1a8912145497806e8925859a87 #19752
Closes #19797

tests/runtests.pl

index 1bde3f3afc648165d2547862de9142dbaa11d691..d0455d2243807ce672151b7cef9b6ffee6530db7 100755 (executable)
@@ -1750,7 +1750,7 @@ sub singletest_check {
         if(! -f "$logdir/$MEMDUMP") {
             my %cmdhash = getpartattr("client", "command");
             my $cmdtype = $cmdhash{'type'} || "default";
-            if($cmdhash{'option'} !~ /no-memdebug/) {
+            if($cmdhash{'option'} && $cmdhash{'option'} !~ /no-memdebug/) {
                 logmsg "\n** ALERT! memory tracking with no output file?\n"
                     if($cmdtype ne "perl");
             }