Thanks to visit codestin.com
Credit goes to github.com

Skip to content

memory leak refspec.c #3271

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

Merged
merged 1 commit into from
Jun 30, 2015
Merged

memory leak refspec.c #3271

merged 1 commit into from
Jun 30, 2015

Conversation

jeffhostetler
Copy link
Contributor

A couple of memory leaks.

@jeffhostetler
Copy link
Contributor Author

I reverted the change in tests/filter/stream.c because it caused a segfault on Linux on Travis. I'm still seeing it as a leak on Windows though. So we can address this separately later.

@ethomson
Copy link
Member

Looks like a few places call refspec__free assuming that they can always do so. Might be a safe thing to zero the refpsec so that subsequent free calls succeed.

@jeffhostetler
Copy link
Contributor Author

Yeah, most of the calls to git_refspec__parse() do explicitly free the refspec regardless of the parse result. The leak was because some calls just returned if the parse failed.

@jeffhostetler jeffhostetler changed the title memory leak refspec.c and filter test memory leak refspec.c Jun 30, 2015
ethomson added a commit that referenced this pull request Jun 30, 2015
@ethomson ethomson merged commit 3451c87 into libgit2:master Jun 30, 2015
@jeffhostetler jeffhostetler deleted the more_leaks branch June 30, 2015 14:31
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