]> Kevux Git Server - rit/commit
builtin/rev-list: fix leaking bitmap index when calculating disk usage
authorPatrick Steinhardt <ps@pks.im>
Tue, 11 Jun 2024 09:19:55 +0000 (11:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Jun 2024 20:15:05 +0000 (13:15 -0700)
commit61f8bb1ec1ef6022c2e7994b8b896ab158d7070b
treeead48ed7824d24bc1721addcc2d11470be2d584f
parentf644dc84949bcc6d6d06274a30feb4b366ae68de
builtin/rev-list: fix leaking bitmap index when calculating disk usage

git-rev-list(1) can speed up its object size calculations for reachable
objects via a bitmap walk, if there is any bitmap. This is done in
`try_bitmap_disk_usage()`, which tries to optimistically load the bitmap
and then use it, if available. It never frees it though, leading to a
memory leak. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rev-list.c
t/t6115-rev-list-du.sh