From: "AreaZR via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: AreaZR <gfunni234@gmail.com>, Seija Kijin <doremylover123@gmail.com>
Subject: [PATCH] bundle-url: always close child_out before leaving the function
Date: Wed, 18 Dec 2024 03:32:32 +0000 [thread overview]
Message-ID: <pull.1398.git.git.1734492752951.gitgitgadget@gmail.com> (raw)
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
reply other threads:[~2024-12-18 3:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1398.git.git.1734492752951.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=doremylover123@gmail.com \
--cc=gfunni234@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).