aboutsummaryrefslogtreecommitdiffstats
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-30 11:13:53 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-30 11:23:06 -0700
commitd0ab6630a710c8b3f4cf7e1a3f630a685c5d5721 (patch)
tree9385fc2c5f0b9f8a0700706ac67038464928aa93 /pack-bitmap-write.c
parentpseudo-merge: fix various memory leaks (diff)
downloadgit-d0ab6630a710c8b3f4cf7e1a3f630a685c5d5721.tar.gz
git-d0ab6630a710c8b3f4cf7e1a3f630a685c5d5721.zip
pseudo-merge: fix leaking strmap keys
When creating a new pseudo-merge group we collect a set of matchnig commits and put them into a string map. This strmap is initialized such that it does not allocate its keys, and instead we try to pass ownership of the keys to it via `strmap_put()`. This isn't how it works though: the strmap will never try to release these keys, and consequently they end up leaking. Fix this leak by initializing the strmap as duplicating its keys and not trying to hand over ownership. The leak is exposed by t5333, but plugging it does not yet make the full test suite pass. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
0 files changed, 0 insertions, 0 deletions