Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 21:00:28 +0300
committerJunio C Hamano <gitster@pobox.com>2017-09-07 02:49:28 +0300
commit872d651f528443efa5586a2d81a7629448545f61 (patch)
treeb66ee8c13c45fee547515649dae45035370d3217 /send-pack.c
parent85af9f7a027dc5880fd88d65414df2dc6c6f9366 (diff)
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 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;