summaryrefslogtreecommitdiffstats
path: root/send-pack.c
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 20:00:28 +0200
committerJunio C Hamano <gitster@pobox.com>2017-09-07 08:49:28 +0900
commit872d651f528443efa5586a2d81a7629448545f61 (patch)
treeb66ee8c13c45fee547515649dae45035370d3217 /send-pack.c
parent85af9f7a027dc5880fd88d65414df2dc6c6f9366 (diff)
downloadgit-872d651f528443efa5586a2d81a7629448545f61.tar.gz
git-872d651f528443efa5586a2d81a7629448545f61.tar.xz
send-pack: release strbuf on error return in send_pack()
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/send-pack.c b/send-pack.c
index 11d6f3d98..b865f662e 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -492,8 +492,11 @@ int send_pack(struct send_pack_args *args,
* we were to send it and we're trying to send the refs
* atomically, abort the whole operation.
*/
- if (use_atomic)
+ if (use_atomic) {
+ strbuf_release(&req_buf);
+ strbuf_release(&cap_buf);
return atomic_push_failure(args, remote_refs, ref);
+ }
/* Fallthrough for non atomic case. */
default:
continue;