1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-25 00:46:32 +02:00

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>
This commit is contained in:
Rene Scharfe 2017-08-30 20:00:28 +02:00 committed by Junio C Hamano
parent 85af9f7a02
commit 872d651f52

View File

@ -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;