From f0d866a2eafcd012fb8fda8edd6b32da68859d7b Mon Sep 17 00:00:00 2001 From: Ted Nyman Date: Sun, 26 Jul 2026 17:28:39 -0700 Subject: [PATCH] http: avoid closing index-pack input twice finish_http_pack_request() passes its staging-file descriptor to index-pack through child_process.in. start_command() takes ownership of a supplied descriptor and closes it, even when starting the child fails. Do not close the descriptor again after run_command() returns. Signed-off-by: Ted Nyman Signed-off-by: Junio C Hamano --- http.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/http.c b/http.c index b4e7b8d00b..930e0d227f 100644 --- a/http.c +++ b/http.c @@ -2704,13 +2704,8 @@ int finish_http_pack_request(struct http_pack_request *preq) else ip.no_stdout = 1; - if (run_command(&ip)) { + if (run_command(&ip)) ret = -1; - goto cleanup; - } - -cleanup: - close(tmpfile_fd); unlink(preq->tmpfile.buf); return ret; } -- 2.47.3