Skip to content

odb: mempack: fix leaking objects when freeing mempacks#4602

Merged
ethomson merged 1 commit intolibgit2:masterfrom
pks-t:pks/mempack-memleak
Mar 29, 2018
Merged

odb: mempack: fix leaking objects when freeing mempacks#4602
ethomson merged 1 commit intolibgit2:masterfrom
pks-t:pks/mempack-memleak

Conversation

@pks-t
Copy link
Copy Markdown
Member

@pks-t pks-t commented Mar 29, 2018

When a ODB mempack gets free'd, we take no measures at all to free its
contents, most notably the objects added to the database, resulting in a
memory leak. Call git_mempack_reset previous to freeing the ODB
structures themselves, which takes care of releasing all associated
data structures.

When a ODB mempack gets free'd, we take no measures at all to free its
contents, most notably the objects added to the database, resulting in a
memory leak. Call `git_mempack_reset` previous to freeing the ODB
structures themselves, which takes care of releasing all associated
data structures.
@pks-t pks-t added the backport label Mar 29, 2018
@ethomson
Copy link
Copy Markdown
Member

Seems like valgrind and coverity should have caught this. mempack was basically an experiment that got shelved, but if people are using it then we should at least have some minimal unit tests here to catch these sorts of things?

@pks-t
Copy link
Copy Markdown
Member Author

pks-t commented Mar 29, 2018

We do have these tests since last week. That's why they were catched by Valgrind, that's how I noticed

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