michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
426 stars 157 forks source link

Fixed some memory leak issues. #279

Closed TrondKjeldas closed 2 years ago

TrondKjeldas commented 3 years ago

There were several cases where the mxml_load_data() function, when it bailed out with an error, did not release the 'node' variable before returning.

Also fixed memory leak in the testmxml.c file, which cause some annoyance when building the library for fuzzing.

michaelrsweet commented 3 years ago

@TrondKjeldas Thanks for this, I'll review when I get a chance but at first glance looks reasonable.

michaelrsweet commented 2 years ago

[master bd4eb86] Fix potential memory leak in mxmlLoadXxx (Issue #278, Issue #279)