summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-31 18:49:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-31 18:49:55 (GMT)
commit1d42cf3c6c578003f35d32cb7b98aa19a96a17c1 (patch)
tree68d45a881be495f9a8084594015ddf31d50d3b68 /builtin/receive-pack.c
parent598d7eb160c46e55cf5dc07d04c8c917bc0dd646 (diff)
parent5d222c099e38bcf329af544ec42ad3dd0644741c (diff)
downloadgit-1d42cf3c6c578003f35d32cb7b98aa19a96a17c1.zip
git-1d42cf3c6c578003f35d32cb7b98aa19a96a17c1.tar.gz
git-1d42cf3c6c578003f35d32cb7b98aa19a96a17c1.tar.bz2
Merge branch 'jc/push-cert'
* jc/push-cert: receive-pack: avoid minor leak in case start_async() fails
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index fc03937..32fc540 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -527,8 +527,6 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
proc.in = -1;
proc.stdout_to_stderr = 1;
- prepare_push_cert_sha1(&proc);
-
if (use_sideband) {
memset(&muxer, 0, sizeof(muxer));
muxer.proc = copy_to_sideband;
@@ -539,6 +537,8 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
proc.err = muxer.in;
}
+ prepare_push_cert_sha1(&proc);
+
code = start_command(&proc);
if (code) {
if (use_sideband)