Browse Source

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>
maint
Rene Scharfe 8 years ago committed by Junio C Hamano
parent
commit
872d651f52
  1. 5
      send-pack.c

5
send-pack.c

@ -492,8 +492,11 @@ int send_pack(struct send_pack_args *args, @@ -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;

Loading…
Cancel
Save