All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bundle-url: always close child_out before leaving the function
@ 2024-12-18  3:32 AreaZR via GitGitGadget
  0 siblings, 0 replies; only message in thread
From: AreaZR via GitGitGadget @ 2024-12-18  3:32 UTC (permalink / raw)
  To: git; +Cc: AreaZR, Seija Kijin

From: Seija Kijin <doremylover123@gmail.com>

Otherwise, child_out may always be left open

Signed-off-by: Seija Kijin <doremylover123@gmail.com>
---
    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(-)

diff --git a/bundle-uri.c b/bundle-uri.c
index cdf9e4f9e1d..23dfc1999b5 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -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
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-18  3:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18  3:32 [PATCH] bundle-url: always close child_out before leaving the function AreaZR via GitGitGadget

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.