Commit d9ab1cd
fixup! pack-bitmap.c: open and store incremental bitmap layers
The incremental MIDX bitmap work was done prior to 9d4855e
(midx-write: fix leaking buffer, 2024-09-30), and causes test failures
in t5334 in a post-9d4855eef3 world.
The leak looks like:
Direct leak of 264 byte(s) in 1 object(s) allocated from:
#0 0x7f6bcd87eaca in calloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:90
#1 0x55ad1428e8a4 in xcalloc wrapper.c:151
#2 0x55ad14199e16 in prepare_midx_bitmap_git pack-bitmap.c:742
#3 0x55ad14199447 in open_midx_bitmap_1 pack-bitmap.c:507
#4 0x55ad14199cca in open_midx_bitmap pack-bitmap.c:704
#5 0x55ad14199d44 in open_bitmap pack-bitmap.c:717
#6 0x55ad14199dc2 in prepare_bitmap_git pack-bitmap.c:733
#7 0x55ad1419e496 in test_bitmap_walk pack-bitmap.c:2698
#8 0x55ad14047b0b in cmd_rev_list builtin/rev-list.c:629
#9 0x55ad13f71cd6 in run_builtin git.c:487
#10 0x55ad13f72132 in handle_builtin git.c:756
#11 0x55ad13f72380 in run_argv git.c:826
#12 0x55ad13f728f4 in cmd_main git.c:961
#13 0x55ad1407d3ae in main common-main.c:64
#14 0x7f6bcd5f0c89 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#15 0x7f6bcd5f0d44 in __libc_start_main_impl ../csu/libc-start.c:360
#16 0x55ad13f6ff90 in _start (git+0x1ef90) (BuildId: 3e63cdd415f1d185b21da3035cb48332510dddce)
, and is a result of us not freeing the resources corresponding to the
bitmap's base layer, if one was present.
Rectify that leak by calling the newly-introduced free_bitmap_index()
function on the base layer to ensure that its resources are also freed.
Signed-off-by: Taylor Blau <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 9d49c75 commit d9ab1cd
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3041 | 3041 | | |
3042 | 3042 | | |
3043 | 3043 | | |
| 3044 | + | |
3044 | 3045 | | |
3045 | 3046 | | |
3046 | 3047 | | |
| |||
0 commit comments