summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Rene Scharfe <l.s.r@web.de>2017-08-30 20:00:28 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-07 08:49:28 +0900
commit872d651f528443efa5586a2d81a7629448545f61 (patch)
treeb66ee8c13c45fee547515649dae45035370d3217
parentremote: release strbuf after use in set_url() (diff)
downloadtgif-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>
-rw-r--r--send-pack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/send-pack.c b/send-pack.c
index 11d6f3d983..b865f662e4 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;