New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug memory leaks #356

Merged
merged 1 commit into from Mar 27, 2014

Conversation

Projects
None yet
2 participants
@carlosmn
Member

carlosmn commented Mar 27, 2014

This patch is mostly about making sure that we free the copies of what
we have, as well as making sure that we can free it.

The IndexEntry forgot to free its path, but it also used a pointer to
python-owned memory, which could be freed at any time.

MergeResult completely lacked a deallocator.

Signature needs to make sure we can free the enocoding, and not to set
an owner when we own the memory (in this case for the default
signature).

The repository needs to get rid of its reference to the object list when
returning.

The transfer progress callback needs to decref the stats object.

Plug memory leaks
This patch is mostly about making sure that we free the copies of what
we have, as well as making sure that we can free it.

The IndexEntry forgot to free its path, but it also used a pointer to
python-owned memory, which could be freed at any time.

MergeResult completely lacked a deallocator.

Signature needs to make sure we can free the enocoding, and not to set
an owner when we own the memory (in this case for the default
signature).

The repository needs to get rid of its reference to the object list when
returning.

The transfer progress callback needs to decref the stats object.

@jdavid jdavid merged commit b37d1c9 into libgit2:master Mar 27, 2014

1 check passed

default The Travis CI build passed
Details

@carlosmn carlosmn deleted the carlosmn:leaks branch Mar 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment