transport-helper: plug strbuf and string_list leaks
commit176cb979fe7c1cf6b789c9263ca20312385c1f31
authorRené Scharfe <l.s.r@web.de>
Fri, 8 Dec 2017 17:29:31 +0000 (8 18:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2017 20:18:09 +0000 (8 12:18 -0800)
tree31ce4c26b4225debedd84df40a3b21c916e3408a
parent3013dff8662eae06457fe6e5348dfe2270810ab2
transport-helper: plug strbuf and string_list leaks

Transfer ownership of detached strbufs to string_lists of the
duplicating variety by calling string_list_append_nodup() instead of
string_list_append() to avoid duplicating and then leaking the buffer.

While at it make sure to release the string_list when done;
push_refs_with_export() already does that.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c