Junio C Hamano <gitster@xxxxxxxxx> writes: >> + co_buf = xmalloc(len); >> + memcpy(co_buf, buf, len); >> >> hash_object_file(the_hash_algo, buf, len, type, oid); >> if (repo_has_object_file_with_flags(the_repository, oid, OBJECT_INFO_QUICK | OBJECT_INFO_SKIP_FETCH_OBJECT) || > > There is an early return around here. Perhaps we are leaking co_buf > when we hit it? Indeed, that seems to be the case. With the attached at the tip of the branch and rebuilding 'seen' seems to pass these 6130, 7010, 8002 tests with SANTIZE=leak.