diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xplist.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xplist.c b/src/xplist.c index e368b8b..1ee0138 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -556,6 +556,14 @@ PLIST_API void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length) | |||
| 556 | setlocale(LC_NUMERIC, saved_locale); | 556 | setlocale(LC_NUMERIC, saved_locale); |
| 557 | free(saved_locale); | 557 | free(saved_locale); |
| 558 | } | 558 | } |
| 559 | |||
| 560 | /* free memory from parser initialization */ | ||
| 561 | xmlCleanupCharEncodingHandlers(); | ||
| 562 | xmlDictCleanup(); | ||
| 563 | xmlResetLastError(); | ||
| 564 | xmlCleanupGlobals(); | ||
| 565 | xmlCleanupThreads(); | ||
| 566 | xmlCleanupMemory(); | ||
| 559 | } | 567 | } |
| 560 | 568 | ||
| 561 | static xmlParserInputPtr plist_xml_external_entity_loader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) | 569 | static xmlParserInputPtr plist_xml_external_entity_loader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) |
| @@ -576,4 +584,12 @@ PLIST_API void plist_from_xml(const char *plist_xml, uint32_t length, plist_t * | |||
| 576 | xml_to_node(root_node, plist); | 584 | xml_to_node(root_node, plist); |
| 577 | xmlFreeDoc(plist_doc); | 585 | xmlFreeDoc(plist_doc); |
| 578 | } | 586 | } |
| 587 | |||
| 588 | /* free memory from parser initialization */ | ||
| 589 | xmlCleanupCharEncodingHandlers(); | ||
| 590 | xmlDictCleanup(); | ||
| 591 | xmlResetLastError(); | ||
| 592 | xmlCleanupGlobals(); | ||
| 593 | xmlCleanupThreads(); | ||
| 594 | xmlCleanupMemory(); | ||
| 579 | } | 595 | } |
