aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-11-05 07:17:23 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-04 22:37:54 -0800
commit1a99173de0618636fdd534f46b866a9bb39e487d (patch)
tree6b1f226157ac4e0e587e36cc47142e0042963182
parent6ef9f77a15fcb198b59840a9ed3a8f88da5ad53d (diff)
downloadgit-1a99173de0618636fdd534f46b866a9bb39e487d.tar.gz
transport-helper: fix leaking import/export marks
Fix leaking import and export marks for transport helpers. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5801-remote-helpers.sh1
-rw-r--r--transport-helper.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index d21877150e..d4882288a3 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -8,6 +8,7 @@ test_description='Test remote-helper import and export commands'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-gpg.sh
diff --git a/transport-helper.c b/transport-helper.c
index 013ec79dc9..bc27653cde 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -399,6 +399,8 @@ static int release_helper(struct transport *transport)
int res = 0;
struct helper_data *data = transport->data;
refspec_clear(&data->rs);
+ free(data->import_marks);
+ free(data->export_marks);
res = disconnect_helper(transport);
free(transport->data);
return res;