aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-05 12:09:31 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-05 08:49:12 -0700
commitee087c29c89ad54980f2521641f5f182f6adbc79 (patch)
treea9a1e82fc009128bc50c0c279f4ce5c22484367f /t
parentbuiltin/pack-objects: plug leaking list of keep-packs (diff)
downloadgit-ee087c29c89ad54980f2521641f5f182f6adbc79.tar.gz
git-ee087c29c89ad54980f2521641f5f182f6adbc79.zip
builtin/grep: fix leaking object context
Even when `get_oid_with_context()` fails it may have allocated some data in the object context. But we do not release it in git-grep(1) when the call fails, leading to a memory leak. Plug it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6132-pathspec-exclude.sh1
-rwxr-xr-xt/t6135-pathspec-with-attrs.sh2
2 files changed, 3 insertions, 0 deletions
diff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh
index 9fdafeb1e9..f31c09c056 100755
--- a/t/t6132-pathspec-exclude.sh
+++ b/t/t6132-pathspec-exclude.sh
@@ -2,6 +2,7 @@
test_description='test case exclude pathspec'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '
diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh
index 120dcd74a5..794bc7daf0 100755
--- a/t/t6135-pathspec-with-attrs.sh
+++ b/t/t6135-pathspec-with-attrs.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='test labels in pathspecs'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup a tree' '