The first patch fixes the race condition problem reported by Phil, which ocasionally caused a segmentation fault during git-grep executions. The second patch fixes a memory leak in the same code. Matheus Tavares (2): packfile: fix race condition on unpack_entry() packfile: fix memory leak in add_delta_base_cache() packfile.c | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) -- 2.28.0