mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Call xmlCleanupParser only once - when we are done with libxml
Calling xmlCleanupParser in parse-xml.c:parse_xml_buffer() caused massive memory corruption mostly affecting gtk's FileChooser dialogs and the application menu. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0cf3a11645
commit
7226a48a8c
3 changed files with 9 additions and 1 deletions
|
@ -1497,7 +1497,6 @@ void parse_xml_buffer(const char *url, const char *buffer, int size, GError **er
|
|||
traverse(xmlDocGetRootElement(doc));
|
||||
dive_end();
|
||||
xmlFreeDoc(doc);
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
||||
void parse_xml_init(void)
|
||||
|
@ -1505,6 +1504,11 @@ void parse_xml_init(void)
|
|||
LIBXML_TEST_VERSION
|
||||
}
|
||||
|
||||
void parse_xml_exit(void)
|
||||
{
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
||||
#ifdef XSLT
|
||||
|
||||
/* Maybe we'll want a environment variable that can override this.. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue