Skip to content
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 some memory leaks #33

Merged
merged 2 commits into from Sep 15, 2020
Merged

Plug some memory leaks #33

merged 2 commits into from Sep 15, 2020

Conversation

otavio
Copy link
Member

@otavio otavio commented Sep 14, 2020

We avoid now calling .into_raw() so we don't need to read the raw
pointer back, to free it. Also, we reworked the error handling so it
ensures the resource cleanup runs even in error cases.

Signed-off-by: Otavio Salvador otavio@ossystems.com.br

We avoid now calling `.into_raw()` so we don't need to read the raw
pointer back, to free it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
@coveralls
Copy link

coveralls commented Sep 14, 2020

Pull Request Test Coverage Report for Build 254755556

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.101%

Totals Coverage Status
Change from base Build 254728918: 0.0%
Covered Lines: 121
Relevant Lines: 159

💛 - Coveralls

@otavio otavio changed the title Plug two memory leaks when handling entry pathname/hardlink Plug some memory leaks Sep 15, 2020
We need to always handle the cleanup of resources even when we are
catching errors so to avoid a lot of code duplication we wrap the
internal logic into a lambda.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
@Jonathas-Conceicao Jonathas-Conceicao merged commit c15c3b3 into master Sep 15, 2020
@Jonathas-Conceicao Jonathas-Conceicao deleted the topic/fix-leak branch September 15, 2020 13:37
otavio added a commit that referenced this pull request Sep 15, 2020
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants