pack: dereference cached pack entry on error by pks-t · Pull Request #4027 · libgit2/libgit2 · GitHub
Skip to content

pack: dereference cached pack entry on error#4027

Merged
carlosmn merged 1 commit into
libgit2:masterfrom
pks-t:pks/pack-deref-cache-on-error
Dec 19, 2016
Merged

pack: dereference cached pack entry on error#4027
carlosmn merged 1 commit into
libgit2:masterfrom
pks-t:pks/pack-deref-cache-on-error

Conversation

@pks-t

@pks-t pks-t commented Dec 12, 2016

Copy link
Copy Markdown
Member

When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.

When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.
@pks-t

pks-t commented Dec 12, 2016

Copy link
Copy Markdown
Member Author

@carlosmn carlosmn merged commit 903955f into libgit2:master Dec 19, 2016
@pks-t pks-t deleted the pks/pack-deref-cache-on-error branch February 8, 2017 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants