diff --git a/src/misc_xml.c b/src/misc_xml.c index a98cc7c7..ac558982 100644 --- a/src/misc_xml.c +++ b/src/misc_xml.c @@ -111,6 +111,9 @@ xml_from_file(const char *path) void xml_free(xml_node *top) { + if (!top || !top->doc) + return; + xmlFreeDoc(top->doc); }