From: Jeff King Date: Thu, 05 Mar 2026 23:03:15 GMT Subject: [PATCH 0/4] plugging some mmap() leaks Message-ID: <20260305230315.GA2354983@coredump.intra.peff.net> In-Reply-To: <20260305220214.GB736322@coredump.intra.peff.net> On Thu, Mar 05, 2026 at 05:02:14PM -0500, Jeff King wrote: > Anyway, I think the solution is probably something like the patch above, > though probably it needs to cover the case where new_pack is NULL. So here is a more polished version. I decided to try running the whole test suite with leak-checking and NO_MMAP, and it turned up one other case. This series fixes that, too, and then turns on the flag for all leak-checking builds. [1/4]: check_connected(): delay opening new_pack [2/4]: check_connected(): fix leak of pack-index mmap [3/4]: pack-revindex: avoid double-loading .rev files [4/4]: Makefile: turn on NO_MMAP when building with LSan Makefile | 1 + connected.c | 38 +++++++++++++++++++------------------- pack-revindex.c | 4 ++++ 3 files changed, 24 insertions(+), 19 deletions(-) -Peff