These couple of patches fix some remaining memory leaks in unpack-trees.c, which mostly happen via a lack of calls to dir_clear() fixed in 2/2. This goes on top of ab/sanitize-leak-ci (but not en/removing-untracked-fixes). In 1/2 I mark a test as passing under SANITIZE=leak, which assumes that an environment variable added by ab/sanitize-leak-ci is understood. Without ab/sanitize-leak-ci it'll be silently ignored. Elijah has parallel work in fixing leaks in dir.c, but without his ab/sanitize-leak-ci that test will also pass, it's not one of the ones that needed something like his leak fixes to {dir,unpack-trees}.c to pass. Ævar Arnfjörð Bjarmason (2): unpack-trees: don't leak memory in verify_clean_subdirectory() built-ins & lib: plug memory leaks with unpack_trees_options_release() archive.c | 11 ++++++++--- builtin/am.c | 17 ++++++++++++----- builtin/checkout.c | 9 +++++++-- builtin/clone.c | 1 + builtin/commit.c | 6 +++++- builtin/merge.c | 6 ++++-- builtin/read-tree.c | 14 ++++++++++---- builtin/reset.c | 13 +++++++++---- builtin/stash.c | 14 ++++++++++---- diff-lib.c | 5 ++++- sequencer.c | 2 ++ t/t1001-read-tree-m-2way.sh | 2 ++ unpack-trees.c | 3 ++- 13 files changed, 76 insertions(+), 27 deletions(-) -- 2.33.0.1441.gbbcdb4c3c66