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

Avoid leaking memory when validating schemata #250

Merged
merged 1 commit into from Mar 14, 2021
Merged

Avoid leaking memory when validating schemata #250

merged 1 commit into from Mar 14, 2021

Conversation

netbsduser
Copy link
Contributor

Schemata validation functions use unsafe iterators and break midway through when they find the element they look for. This causes memory allocated for the iterator to never be freed, since iterator memory is freed only when the final element is reached.
I have quickly introduced the use of safe iterators in the parts which I found with Valgrind to leak memory in my application. There may be other instances which need similar conversion to use safe iterators, but this solves the current issues I'm having.

@vstakhov
Copy link
Owner

Sorry, I have overlooked this PR, merging now. Thank you!

@vstakhov vstakhov merged commit 9978136 into vstakhov:master Mar 14, 2021
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.

None yet

2 participants