{"thread":{"id":"62663","subject":"[PATCH] bundle-url: always close child_out before leaving the function","startedAt":"2024-12-18T03:32:36Z","lastAt":"2024-12-18T03:32:36Z","messageCount":1,"participants":["AreaZR via GitGitGadget"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"509272","messageId":"pull.1398.git.git.1734492752951.gitgitgadget@gmail.com","threadId":"62663","inReplyTo":null,"subject":"[PATCH] bundle-url: always close child_out before leaving the function","fromName":"AreaZR via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-12-18T03:32:32Z","receivedAt":"2024-12-18T03:32:36Z","isPatch":true,"sender":{"key":"name:AreaZR","avatar":null},"body":"From: Seija Kijin <doremylover123@gmail.com>\n\nOtherwise, child_out may always be left open\n\nSigned-off-by: Seija Kijin <doremylover123@gmail.com>\n---\n    bundle-url: always close child_out before leaving the function\n    \n    Otherwise, child_out may always be left open\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1398%2FAreaZR%2Fbug-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1398/AreaZR/bug-v1\nPull-Request: https://github.com/git/git/pull/1398\n\n bundle-uri.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/bundle-uri.c b/bundle-uri.c\nindex cdf9e4f9e1d..23dfc1999b5 100644\n--- a/bundle-uri.c\n+++ b/bundle-uri.c\n@@ -337,10 +337,10 @@ static int download_https_uri_to_file(const char *file, const char *uri)\n cleanup:\n \tif (child_in)\n \t\tfclose(child_in);\n-\tif (finish_command(&cp))\n-\t\treturn 1;\n \tif (child_out)\n \t\tfclose(child_out);\n+\tif (finish_command(&cp))\n+\t\treturn 1;\n \treturn result;\n }\n \n\nbase-commit: d882f382b3d939d90cfa58d17b17802338f05d66\n-- \ngitgitgadget\n"}]}