Skip to content

Commit 66893a1

Browse files
pks-tgitster
authored andcommitted
builtin/send-pack: fix leaking list of push options
The list of push options is leaking. Plug the leak. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a6c3062 commit 66893a1

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

builtin/send-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ int cmd_send_pack(int argc,
340340
/* stable plumbing output; do not modify or localize */
341341
fprintf(stderr, "Everything up-to-date\n");
342342

343+
string_list_clear(&push_options, 0);
343344
free_refs(remote_refs);
344345
free_refs(local_refs);
345346
refspec_clear(&rs);

t/t5411-proc-receive-hook.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test_description='Test proc-receive hook'
88
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
99
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1010

11+
TEST_PASSES_SANITIZE_LEAK=true
1112
. ./test-lib.sh
1213

1314
. "$TEST_DIRECTORY"/t5411/common-functions.sh

t/t5545-push-options.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
88
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
99
export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
1010

11+
TEST_PASSES_SANITIZE_LEAK=true
1112
. ./test-lib.sh
1213

1314
mk_repo_pair () {

0 commit comments

Comments
 (0)