]> git.ipfire.org Git - thirdparty/git.git/commit
transport-helper: fix strbuf leak in push_refs_with_push()
authorJeff King <peff@peff.net>
Tue, 24 Sep 2024 21:56:34 +0000 (17:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Sep 2024 17:24:54 +0000 (10:24 -0700)
commite00e1cff0d845a66c58180d75c33be109a958ba3
treea003938866f74f382268daf6c0283eb5458c1ace
parent05372c28bedbd2ae067e695805590b7eea947e10
transport-helper: fix strbuf leak in push_refs_with_push()

We loop over the refs to push, building up a strbuf with the set of
"push" directives to send to the remote helper. But if the atomic-push
flag is set and we hit a rejected ref, we'll bail from the function
early. We clean up most things, but forgot to release the strbuf.

Fixing this lets us mark t5541 as leak-free.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5541-http-push-smart.sh
transport-helper.c