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

fix: memory leak in Reader#base_uri #2347

Merged
merged 1 commit into from
Oct 23, 2021

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

Playing with ruby_memcheck led to finding a few easy-to-fix memory leaks.

  • Reader#base_uri was not freeing the string returned by xmlTextReaderBaseUri()

This PR also cleans up the Reader C function.

Have you included adequate test coverage?

#2344 is a parallel effort to automate the leak checking that I ran on the existing test suite to find these.

Also clean up that function.
@flavorjones flavorjones force-pushed the flavorjones-reader-base-uri-memory-leak branch from bdd597e to 68c1911 Compare October 22, 2021 18:39
@flavorjones flavorjones merged commit 0d85823 into main Oct 23, 2021
@flavorjones flavorjones deleted the flavorjones-reader-base-uri-memory-leak branch October 23, 2021 18:01
@flavorjones flavorjones added this to the v1.13.0 milestone Oct 24, 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

1 participant