diff options
| author | Jeff King <peff@peff.net> | 2024-09-24 17:56:34 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-25 10:24:54 -0700 |
| commit | e00e1cff0d845a66c58180d75c33be109a958ba3 (patch) | |
| tree | a003938866f74f382268daf6c0283eb5458c1ace /t/t5541-http-push-smart.sh | |
| parent | 05372c28bedbd2ae067e695805590b7eea947e10 (diff) | |
| download | git-e00e1cff0d845a66c58180d75c33be109a958ba3.tar.gz | |
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>
Diffstat (limited to 't/t5541-http-push-smart.sh')
| -rwxr-xr-x | t/t5541-http-push-smart.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 71428f3d5c..3ad514bbd4 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -7,6 +7,7 @@ test_description='test smart pushing over http via http-backend' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh ROOT_PATH="$PWD" |
