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

Memory leak in mxml_load_data() error handling #278

Closed
TrondKjeldas opened this issue Feb 1, 2021 · 3 comments
Closed

Memory leak in mxml_load_data() error handling #278

TrondKjeldas opened this issue Feb 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working priority-medium
Milestone

Comments

@TrondKjeldas
Copy link

If the mxml_load_data() function bails out at the ‘goto error’ statement at approx line 1978 it never releases the ‘node’ pointer allocated a few lines further up.

The issue can be reproduced by feeding the mxmlLoadString() function with a 0-terminated string containing only the two characters ‘<‘ and ‘\n’.

@TrondKjeldas TrondKjeldas changed the title Memory leak in mxml_load_data() error handlinf Memory leak in mxml_load_data() error handling Feb 1, 2021
@michaelrsweet michaelrsweet self-assigned this Feb 1, 2021
@michaelrsweet michaelrsweet added the investigating Investigating the issue label Feb 1, 2021
@TrondKjeldas
Copy link
Author

I have found a few more cases where there is memory leak.

I have a fix that fixes all these cases for me, and will try to submit a pull request.

@michaelrsweet
Copy link
Owner

@TrondKjeldas Thanks!

@TrondKjeldas
Copy link
Author

This seems to work fine for me: #279

@michaelrsweet michaelrsweet linked a pull request Oct 26, 2021 that will close this issue
@michaelrsweet michaelrsweet added bug Something isn't working priority-medium and removed investigating Investigating the issue labels Oct 26, 2021
@michaelrsweet michaelrsweet added this to the Stable milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants