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

Skip to content

Memory leak fixes #3816

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 3 commits into from
Jun 14, 2016
Merged

Memory leak fixes #3816

merged 3 commits into from
Jun 14, 2016

Conversation

pks-t
Copy link
Member

@pks-t pks-t commented Jun 7, 2016

This fixes all memory leaks displayed by AppVeyor's debug CRT. The winhttp-related plug is the only actual fix for memory leaks inside of libgit2 and not its tests.

pks-t added 3 commits June 7, 2016 12:29
The thread local storage is used to hold some global state that
is dynamically allocated and should be freed upon exit. On
Windows, we clean up the C run-time right after execution of
registered shutdown callbacks and before cleaning up the TLS.

When we clean up the CRT, we also cause it to analyze for memory
leaks. As we did not free the TLS yet this will lead to false
positives.

Fix the issue by first freeing the TLS and cleaning up the CRT
only afterwards.
@ethomson
Copy link
Member

Thanks again for tackling these. ❤️

@ethomson ethomson merged commit 2a09de9 into libgit2:master Jun 14, 2016
@pks-t pks-t deleted the pks/memory-leaks branch June 21, 2016 05:44
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