send-pack: clean up extra_have oid array
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. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Keller committed
Jun 27, 2025 at 15:09 UTC
d1c44861f9c86ef3ff6e0614e423d86a2a41db4f
1 file changed
+1
builtin/send-pack.c
+1
@@ -344,6 +344,7 @@ int cmd_send_pack(int argc,
344
free_refs(remote_refs);
345
free_refs(local_refs);
346
refspec_clear(&rs);
347
+ oid_array_clear(&extra_have);
348
oid_array_clear(&shallow);
349
clear_cas_option(&cas);
350
return ret;