]> git.99rst.org Git - git.git/commit
pack-bitmap.c: don't leak type-level bitmaps
authorTaylor Blau <redacted>
Tue, 26 Oct 2021 21:01:23 +0000 (17:01 -0400)
committerJunio C Hamano <redacted>
Thu, 28 Oct 2021 22:32:14 +0000 (15:32 -0700)
commit022815114a8a57188bc0e8fd622e10d5e22604dc
treef40ef7d04ffc33ef7508c5028c6749fe534802e1
parent60980aed786487e9113f0cb2907dfc75a77d363c
pack-bitmap.c: don't leak type-level bitmaps

test_bitmap_walk() is used to implement `git rev-list --test-bitmap`,
which compares the result of the on-disk bitmaps with ones generated
on-the-fly during a revision walk.

In fa95666a40 (pack-bitmap.c: harden 'test_bitmap_walk()' to check type
bitmaps, 2021-08-24), we hardened those tests to also check the four
special type-level bitmaps, but never freed those bitmaps. We should
have, since each required an allocation when we EWAH-decompressed them.

Free those, plugging that leak, and also free the base (the scratch-pad
bitmap), too.

Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
pack-bitmap.c
git clone https://git.99rst.org/PROJECT