Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-07-01 13:42:56 +0300
committerJunio C Hamano <gitster@pobox.com>2022-07-01 21:43:43 +0300
commite72e12cc02d80e4ebf01e0a3d170617211ae7c70 (patch)
treefd3159ad8ebe26def9f0a2d564b239024089a1f4 /t/t6403-merge-file.sh
parent480a0e30a78a6a86e1ea97059f72e4bf4299d052 (diff)
merge-file: fix memory leaks on error path
Fix a memory leak in "merge-file", we need to loop over the "mmfs" array and free() what we've got so far when we error out. As a result we can mark a test as passing with SANITIZE=leak using "TEST_PASSES_SANITIZE_LEAK=true". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6403-merge-file.sh')
-rwxr-xr-xt/t6403-merge-file.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t6403-merge-file.sh b/t/t6403-merge-file.sh
index 2f421d967a..1a7082323d 100755
--- a/t/t6403-merge-file.sh
+++ b/t/t6403-merge-file.sh
@@ -1,6 +1,8 @@
#!/bin/sh
test_description='RCS merge replacement: merge-file'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'setup' '