Skip to contentSkip to conversation

bundle-url: always close child_out before leaving the function

PATCH New AreaZR via GitGitGadget 1 participant 1 message Dec 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bundle-url: always close child_out before leaving the function

From: Seija Kijin <[email protected]>

Otherwise, child_out may always be left open

---
bundle-url: always close child_out before leaving the function

Otherwise, child_out may always be left open

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1398%2FAreaZR%2Fbug-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1398/AreaZR/bug-v1
Pull-Request: https://github.com/git/git/pull/1398

 bundle-uri.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bundle-uri.c +2 -2
index cdf9e4f9e1d..23dfc1999b5 100644
@@ -337,10 +337,10 @@ static int download_https_uri_to_file(const char *file, const char *uri)
 cleanup:
 	if (child_in)
 		fclose(child_in);
-	if (finish_command(&cp))
-		return 1;
 	if (child_out)
 		fclose(child_out);
+	if (finish_command(&cp))
+		return 1;
 	return result;
 }
 

base-commit: d882f382b3d939d90cfa58d17b17802338f05d66

Signature · 1 line
gitgitgadget