Skip to content

Commit 1a99173

Browse files
pks-tgitster
authored andcommitted
transport-helper: fix leaking import/export marks
Fix leaking import and export marks for transport helpers. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ef9f77 commit 1a99173

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

t/t5801-remote-helpers.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test_description='Test remote-helper import and export commands'
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
. "$TEST_DIRECTORY"/lib-gpg.sh
1314

transport-helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ static int release_helper(struct transport *transport)
399399
int res = 0;
400400
struct helper_data *data = transport->data;
401401
refspec_clear(&data->rs);
402+
free(data->import_marks);
403+
free(data->export_marks);
402404
res = disconnect_helper(transport);
403405
free(transport->data);
404406
return res;

0 commit comments

Comments
 (0)