From: Daniel Stenberg Date: Sat, 20 Apr 2024 12:15:39 +0000 (+0200) Subject: tool_operate: init vars unconditionally in post_per_transfer X-Git-Tag: curl-8_8_0~175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fa594ab7bcf19b39d98a4e2fae4791740482be4;p=thirdparty%2Fcurl.git tool_operate: init vars unconditionally in post_per_transfer In case of (the unlikely) early return, they could otherwise remain uninitialized Spotted by CodeSonar Closes #13430 --- diff --git a/src/tool_operate.c b/src/tool_operate.c index 9f14b3e586..eb29dcd365 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -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);