]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: init vars unconditionally in post_per_transfer
authorDaniel Stenberg <daniel@haxx.se>
Sat, 20 Apr 2024 12:15:39 +0000 (14:15 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 20 Apr 2024 20:47:42 +0000 (22:47 +0200)
In case of (the unlikely) early return, they could otherwise remain
uninitialized

Spotted by CodeSonar

Closes #13430

src/tool_operate.c

index 9f14b3e586035377571362cafdcec3b13993fbf1..eb29dcd36570658cbc1e6f7d8a9a0b8f8bd4d907 100644 (file)
@@ -379,12 +379,12 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
   struct OperationConfig *config = per->config;
   int rc;
 
-  if(!curl || !config)
-    return result;
-
   *retryp = FALSE;
   *delay = 0; /* for no retry, keep it zero */
 
+  if(!curl || !config)
+    return result;
+
   if(per->infdopen)
     close(per->infd);