diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-02 23:41:10 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-02 23:41:10 +0000 |
commit | d1390c8673b178744acd6aa3a681f7b51ed9438f (patch) | |
tree | c0e8ae06726b15a008a4f47fab637b8ff2e2b705 /lib/saxParse.cpp | |
parent | Add ParseBase (diff) | |
download | ilt-d1390c8673b178744acd6aa3a681f7b51ed9438f.tar.bz2 ilt-d1390c8673b178744acd6aa3a681f7b51ed9438f.tar.xz ilt-d1390c8673b178744acd6aa3a681f7b51ed9438f.zip |
Don't leak root node when parsing XML
Diffstat (limited to 'lib/saxParse.cpp')
-rw-r--r-- | lib/saxParse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/saxParse.cpp b/lib/saxParse.cpp index d592a1f..5c597aa 100644 --- a/lib/saxParse.cpp +++ b/lib/saxParse.cpp @@ -11,7 +11,7 @@ namespace Persistence { void SAXParse::parseFile(FILE * file) { - mxmlSAXLoadFile( + mxmlRelease(mxmlSAXLoadFile( nullptr, file, MXML_TEXT_CALLBACK, [](mxml_node_t * n, mxml_sax_event_t e, void * data) { SAXParse * self = static_cast<SAXParse *>(data); @@ -36,6 +36,6 @@ namespace Persistence { break; } }, - this); + this)); } } |