]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/pack-objects: plug leaking list of keep-packs
authorPatrick Steinhardt <ps@pks.im>
Thu, 5 Sep 2024 10:09:26 +0000 (12:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Sep 2024 15:49:12 +0000 (08:49 -0700)
commit149c83e0aa1ee75b2da9c27ce5a819025260b4da
treeb763c2eac50091135bb0d0b5b5834c4bd347bff2
parent860b6780163ade3bb705d6565619ec13efcc77c6
builtin/pack-objects: plug leaking list of keep-packs

The `--keep-pack` option of git-pack-objects(1) populates the arguments
into a string list. And while the list is marked as `NODUP` and thus
won't duplicate the strings, the list entries themselves still need to
be free'd. We don't though, causing a leak.

Plug it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
t/t5616-partial-clone.sh