Re: [PATCH] send-pack: clean up extra_have oid array
- From
Jeff King <peff@peff.net>
- Date
- Jul 3, 2025, 15:38 UTC
- Message-ID
- <20250703153853.GC1309870@coredump.intra.peff.net>
- In-Reply-To
- <20250627-jk-fix-leak-send-pack-v1-1-aadcf0ed8a4b@gmail.com>
On Fri, Jun 27, 2025 at 03:09:04PM -0700, Jacob Keller wrote:
Show 8 quoted lines
> From: Jacob Keller <jacob.keller@gmail.com>
>
> Commit c8009635785e ("fetch-pack, send-pack: clean up shallow oid
> array", 2024-09-25) cleaned up the shallow oid array in cmd_send_pack,
> but didn't clean up extra_have, which is still leaked at program exit.
> I suspect the particular tests in t5539 don't trigger any additions to
> the extra_have array, which explains why the tests can pass leak free
> despite this gap.Thanks, this looks good. At the time I did that other commit, I was focused on just bug-hunting the leaks reported by the tests. So I missed this one.
> I didn't check to see why the t5539 tests don't leak. This leak occured for > me in a day-to-day run with my local git build that happened to still have > sanitizers enabled:
The tests are leak-free now, but I suspect we have a lot of slightly-exotic command invocations like this that still leak. It might be nice to beef up the test coverage, but I'm OK with just fixing them, too.
-Peff