aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorLidong Yan <502024330056@smail.nju.edu.cn>2025-05-12 12:22:10 +0000
committerJunio C Hamano <gitster@pobox.com>2025-05-12 10:58:35 -0700
commit7291c2be6a276f8b3693fb7d8dd763cee14c2485 (patch)
treef9b3168c3a655a8b1d30b46e5185c36ed3ea3998 /commit-graph.c
parentMerge branch 'master' of https://github.com/j6t/gitk (diff)
downloadgit-7291c2be6a276f8b3693fb7d8dd763cee14c2485.tar.gz
git-7291c2be6a276f8b3693fb7d8dd763cee14c2485.zip
pack-bitmap: fix memory leak if `load_bitmap_entries_v1` failed
In pack-bitmap.c:load_bitmap_entries_v1, the function `read_bitmap_1` allocates a bitmap and reads index data into it. However, if any of the validation checks following the allocation fail, the allocated bitmap is not freed, resulting in a memory leak. To avoid this, the validation checks should be performed before the bitmap is allocated. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions