Commit 903955f7 by Carlos Martín Nieto Committed by GitHub

Merge pull request #4027 from pks-t/pks/pack-deref-cache-on-error

pack: dereference cached pack entry on error
parents 34901679 ff5eea06
......@@ -759,8 +759,11 @@ int git_packfile_unpack(
}
cleanup:
if (error < 0)
if (error < 0) {
git__free(obj->data);
if (cached)
git_atomic_dec(&cached->refcount);
}
if (elem)
*obj_offset = curpos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment