]> git.ipfire.org Git - thirdparty/git.git/commit
read-cache: fix leaking hash context in `do_write_index()`
authorPatrick Steinhardt <ps@pks.im>
Mon, 30 Sep 2024 09:13:13 +0000 (11:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Sep 2024 18:23:02 +0000 (11:23 -0700)
commita69d120c077ce4e3f6164e23d41147370a0d687a
treefbd733427cd828dd863a0c8a020f2d4f272a4671
parent9a48fc1da277f37b602f48e8bec22f4725ebf877
read-cache: fix leaking hash context in `do_write_index()`

When writing an index with the EOIE extension we allocate a separate
hash context. We never free that context though, causing a memory leak.
Plug it.

This leak is exposed by t9210, but plugging it alone does not make the
whole test suite pass.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c