Thread (2 messages) 2 messages, 2 authors, 2025-07-03

Re: [PATCH] send-pack: clean up extra_have oid array

From: Jeff King <hidden>
Date: 2025-07-03 15:38:55

On Fri, Jun 27, 2025 at 03:09:04PM -0700, Jacob Keller wrote:
From: Jacob Keller <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help