diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-04-13 22:01:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-14 08:56:10 +0200 |
commit | 6ab75ac83926c154a58104ac832363f128f8ed56 (patch) | |
tree | 25e1bf50641cb6d0723e93a1f316843d32145434 /t/t2200-add-update.sh | |
parent | revisions API: release "reflog_info" in release revisions() (diff) | |
download | git-6ab75ac83926c154a58104ac832363f128f8ed56.tar.xz git-6ab75ac83926c154a58104ac832363f128f8ed56.zip |
revisions API: call diff_free(&revs->pruning) in revisions_release()
Call diff_free() on the "pruning" member of "struct rev_info". Doing
so makes several tests pass under SANITIZE=leak.
This was also the last missing piece that allows us to remove the
UNLEAK() in "cmd_diff" and "cmd_diff_index", which allows us to use
those commands as a canary for general leaks in the revisions API. See
[1] for further rationale, and 886e1084d78 (builtin/: add UNLEAKs,
2017-10-01) for the commit that added the UNLEAK() there.
1. https://lore.kernel.org/git/220218.861r00ib86.gmgdl@evledraar.gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2200-add-update.sh')
-rwxr-xr-x | t/t2200-add-update.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index 0c38f8e356..be394f1131 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -14,6 +14,7 @@ only the updates to dir/sub. Also tested are "git add -u" without limiting, and "git add -u" without contents changes, and other conditions' +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success setup ' |