builtin/repack: fix leaking keep-pack list
The list of packs to keep is populated via a command line option but never free'd. Plug this memory leak. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
ed78f048ae
commit
46f6ca2a68
|
@ -1525,6 +1525,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||
}
|
||||
|
||||
cleanup:
|
||||
string_list_clear(&keep_pack_list, 0);
|
||||
string_list_clear(&names, 1);
|
||||
existing_packs_release(&existing);
|
||||
free_pack_geometry(&geometry);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
test_description='basic git gc tests
|
||||
'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
. "$TEST_DIRECTORY"/lib-terminal.sh
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git repack --geometric works correctly'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./test-lib.sh
|
||||
|
||||
GIT_TEST_MULTI_PACK_INDEX=0
|
||||
|
|
Loading…
Reference in New Issue