aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-11 11:19:17 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-11 13:15:04 -0700
commit56931c4d89e7efe41dd96d230b8176e2d32a035d (patch)
tree9b962b62bef2de8f4deaa61150668b082101ea14 /t
parent03b0e7d3a72a4a9be97b742fc3119ebb70ed9731 (diff)
downloadgit-56931c4d89e7efe41dd96d230b8176e2d32a035d.tar.xz
revision: fix memory leak when reversing revisions
When reversing revisions in a rev walk, `get_revision()` will allocate a new commit list and assign it to `revs->commits`. It does not free the old list though, which makes it leak. Fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3508-cherry-pick-many-commits.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 2d53ce754c..afa7727a4a 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -5,6 +5,7 @@ test_description='test cherry-picking many commits'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
check_head_differs_from() {