builtin/clone: plug leaking HEAD ref in `wanted_peer_refs()`
commit8909d6e1a108a46ae9cde70587aa8b2ad4a067d9
authorPatrick Steinhardt <ps@pks.im>
Tue, 11 Jun 2024 09:20:57 +0000 (11 11:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Jun 2024 20:15:07 +0000 (11 13:15 -0700)
tree82b63c8c2f29a47986e0b639cf97a43b1a0e0df6
parent4806c55c86f7cc45f60a7ff5d757874072265deb
builtin/clone: plug leaking HEAD ref in `wanted_peer_refs()`

In `wanted_peer_refs()` we first create a copy of the "HEAD" ref. This
copy may not actually be passed back to the caller, but is not getting
freed in this case. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
t/t5300-pack-object.sh
t/t5305-include-tag.sh
t/t5612-clone-refspec.sh