Permalink
Browse files

Call xmlInitParser()

  • Loading branch information...
1 parent 0ea7cf3 commit 7e22409a06834f92ba9e700e0739837090fbffcf Nikolai Weibull committed Aug 16, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/nmc.c
View
4 src/nmc.c
@@ -46,6 +46,9 @@ main(UNUSED(int argc), UNUSED(char **argv))
if (getenv("NMC_DEBUG"))
nmc_grammar_debug = 1;
+
+ xmlInitParser();
+
xmlListPtr errors;
xmlDocPtr doc = nmc_parse(BAD_CAST buffer, &errors);
if (!xmlListEmpty(errors))
@@ -54,6 +57,7 @@ main(UNUSED(int argc), UNUSED(char **argv))
xmlListDelete(errors);
xmlSaveFormatFileEnc("-", doc, "UTF-8", 1);
xmlFreeDoc(doc);
+
xmlCleanupParser();
return result;

0 comments on commit 7e22409

Please sign in to comment.