send-pack: clean up extra_have oid array

Commit c800963578 ("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>
maint
Jacob Keller 2025-06-27 15:09:04 -07:00 committed by Junio C Hamano
parent fbe8d3079d
commit d1c44861f9
1 changed files with 1 additions and 0 deletions

View File

@ -344,6 +344,7 @@ int cmd_send_pack(int argc,
free_refs(remote_refs); free_refs(remote_refs);
free_refs(local_refs); free_refs(local_refs);
refspec_clear(&rs); refspec_clear(&rs);
oid_array_clear(&extra_have);
oid_array_clear(&shallow); oid_array_clear(&shallow);
clear_cas_option(&cas); clear_cas_option(&cas);
return ret; return ret;