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-04-13 23:01:53 +0300
committerJunio C Hamano <gitster@pobox.com>2022-04-14 09:56:10 +0300
commit6ab75ac83926c154a58104ac832363f128f8ed56 (patch)
tree25e1bf50641cb6d0723e93a1f316843d32145434 /builtin/diff-index.c
parent81ffbf838070bf68970688e4a11399f58c562cce (diff)
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 'builtin/diff-index.c')
-rw-r--r--builtin/diff-index.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index 3a83183c31..7d158af6b6 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -70,7 +70,6 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
return -1;
}
result = run_diff_index(&rev, option);
- UNLEAK(rev);
result = diff_result_code(&rev.diffopt, result);
release_revisions(&rev);
return result;