Clear the delta base cache during fast-import checkpoint
Otherwise we may reuse the same memory address for a totally different "struct packed_git", and a previously cached object from the prior occupant might be returned when trying to unpack an object from the new pack. Found-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ab2fdb3b62
commit
3d20c636af
@ -943,6 +943,7 @@ static void end_packfile(void)
|
||||
{
|
||||
struct packed_git *old_p = pack_data, *new_p;
|
||||
|
||||
clear_delta_base_cache();
|
||||
if (object_count) {
|
||||
char *idx_name;
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user