]> git.ipfire.org Git - thirdparty/git.git/commit
revision: fix memory leaks when rewriting parents
authorPatrick Steinhardt <ps@pks.im>
Mon, 30 Sep 2024 09:14:03 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Sep 2024 18:23:07 +0000 (11:23 -0700)
commit4cc2cee5ac1491960afc54cc5ef14b50ddceb4d2
treeb7bc3a80016c9ba34d3c33096db0f623c91c4378
parent9d4855eef3644ac00d62e08d797ff7db554ca65d
revision: fix memory leaks when rewriting parents

Both `rewrite_parents()` and `remove_duplicate_parents()` may end up
dropping some parents from a commit without freeing the respective
`struct commit_list` items. This causes a bunch of memory leaks. Plug
these.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t3427-rebase-subtree.sh
t/t6016-rev-list-graph-simplify-history.sh
t/t7003-filter-branch.sh
t/t9350-fast-export.sh
t/t9402-git-cvsserver-refs.sh