summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2026-05-19 11:58:16 -0400
committerJunio C Hamano <gitster@pobox.com>2026-05-20 11:31:14 +0900
commitb0d6e7b0d0b1c20fc847f371dcc261a0c7b27be1 (patch)
tree59c4a3667cadc4b8dd390d25f78d8ffab546fc66 /t/t4013/diff.diff_initial..side
parentd376967fbfb0b366c08be50a1c41d6b30c5e6d89 (diff)
packfile: ensure `close_pack_revindex()` frees in-memory revindex
The following commit will introduce a case where we write a MIDX bitmap over packs that do not themselves have on-disk *.rev files. This case is supported within Git, and we will simply fall back to generating the revindex in memory. But we don't ever release that memory, causing a leak that is exposed by a test introduced in the following commit. (As far as I could find, we never free()'d memory allocated as a byproduct of creating an in-memory revindex, likely because that code predates the leak-checking niceties we have in the test suite now.) Rectify this by calling `FREE_AND_NULL()` on the `p->revindex` field when calling `close_pack_revindex()`. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions