mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-11 13:12:22 +00:00
Merge pull request #4027 from pks-t/pks/pack-deref-cache-on-error
pack: dereference cached pack entry on error
This commit is contained in:
commit
903955f7e5
@ -759,8 +759,11 @@ int git_packfile_unpack(
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (error < 0)
|
if (error < 0) {
|
||||||
git__free(obj->data);
|
git__free(obj->data);
|
||||||
|
if (cached)
|
||||||
|
git_atomic_dec(&cached->refcount);
|
||||||
|
}
|
||||||
|
|
||||||
if (elem)
|
if (elem)
|
||||||
*obj_offset = curpos;
|
*obj_offset = curpos;
|
||||||
|
Loading…
Reference in New Issue
Block a user