From 5fa594ab7bcf19b39d98a4e2fae4791740482be4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 20 Apr 2024 14:15:39 +0200 Subject: [PATCH] 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 --- src/tool_operate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.47.3