summaryrefslogtreecommitdiffstats
path: root/t/t3650-replay-basics.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-01 12:38:11 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-01 17:47:34 +0200
commit34968e56de472fa864641abefbaf4a4923b77507 (patch)
tree47a3d4fd81db5fcbc4bd672f7b55bb844ce17544 /t/t3650-replay-basics.sh
parentGit 2.46-rc2 (diff)
downloadgit-34968e56de472fa864641abefbaf4a4923b77507.tar.xz
git-34968e56de472fa864641abefbaf4a4923b77507.zip
builtin/replay: plug leaking `advance_name` variable
The `advance_name` variable can either contain a static string when parsed via the `--advance` command line option or it may be an allocated string when set via `determine_replay_mode()`. Because we cannot be sure whether it is allocated or not we just didn't free it at all, resulting in a memory leak. Split up the variables such that we can track the static and allocated strings separately and then free the allocated one to fix the memory leak. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-xt/t3650-replay-basics.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t3650-replay-basics.sh b/t/t3650-replay-basics.sh
index 389670262e..12bd3db4cb 100755
--- a/t/t3650-replay-basics.sh
+++ b/t/t3650-replay-basics.sh
@@ -5,6 +5,7 @@ test_description='basic git replay tests'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
GIT_AUTHOR_NAME=author@name