Skip to content

Fix ThinBox::clone() leak. #11

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 4 commits into from
Mar 18, 2020
Merged

Fix ThinBox::clone() leak. #11

merged 4 commits into from
Mar 18, 2020

Conversation

adlerd
Copy link

@adlerd adlerd commented Mar 18, 2020

Adds a test for #10, and fixes it in the least-intrusive way.

Fixes #10.

@CAD97
Copy link
Owner

CAD97 commented Mar 18, 2020

Thanks for this! Miri should also catch leaks, but being able to catch them with just cargo test is even better!

@CAD97 CAD97 merged commit 7735f4e into CAD97:master Mar 18, 2020
@CAD97
Copy link
Owner

CAD97 commented Mar 18, 2020

And yes, I could move the head in as the last step to avoid needing to clean it up in the in-progress drop. I think it turned out a bit cleaner that way. I'll publish a new version with #12.

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.

ThinBox::clone() leaks Head if the iterator panics
2 participants