git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] dir & unpak-trees: memory-leak fixes
@ 2021-10-06  9:40 Ævar Arnfjörð Bjarmason
  2021-10-06  9:40 ` [PATCH 1/2] unpack-trees: don't leak memory in verify_clean_subdirectory() Ævar Arnfjörð Bjarmason
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:40 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren,
	Nguyễn Thái Ngọc Duy, Martin Ågren,
	Andrzej Hunt, Jeff King, Ævar Arnfjörð Bjarmason

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-10-13 13:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  9:40 [PATCH 0/2] dir & unpak-trees: memory-leak fixes Ævar Arnfjörð Bjarmason
2021-10-06  9:40 ` [PATCH 1/2] unpack-trees: don't leak memory in verify_clean_subdirectory() Ævar Arnfjörð Bjarmason
2021-10-06 15:58   ` Elijah Newren
2021-10-06  9:40 ` [PATCH 2/2] built-ins & lib: plug memory leaks with unpack_trees_options_release() Ævar Arnfjörð Bjarmason
2021-10-06 16:12   ` Elijah Newren
2021-10-06 16:33 ` [PATCH 0/2] dir & unpak-trees: memory-leak fixes Elijah Newren
2021-10-07  9:46 ` [PATCH v2 0/3] unpack-trees: " Ævar Arnfjörð Bjarmason
2021-10-07  9:46   ` [PATCH v2 1/3] unpack-trees: don't leak memory in verify_clean_subdirectory() Ævar Arnfjörð Bjarmason
2021-10-07 22:27     ` Junio C Hamano
2021-10-07  9:46   ` [PATCH v2 2/3] sequencer: add a "goto cleanup" to do_reset() Ævar Arnfjörð Bjarmason
2021-10-07 16:06     ` Elijah Newren
2021-10-07  9:46   ` [PATCH v2 3/3] sequencer: fix a memory leak in do_reset() Ævar Arnfjörð Bjarmason
2021-10-07 16:10   ` [PATCH v2 0/3] unpack-trees: memory-leak fixes Elijah Newren
2021-10-13 13:23   ` [PATCH v3 " Ævar Arnfjörð Bjarmason
2021-10-13 13:23     ` [PATCH v3 1/3] unpack-trees: don't leak memory in verify_clean_subdirectory() Ævar Arnfjörð Bjarmason
2021-10-13 13:23     ` [PATCH v3 2/3] sequencer: add a "goto cleanup" to do_reset() Ævar Arnfjörð Bjarmason
2021-10-13 13:23     ` [PATCH v3 3/3] sequencer: fix a memory leak in do_reset() Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).