Browse code

libxml2 thread safety for pkg/xar and dmg.

Steven Morgan authored on 2013/12/04 05:48:09
Showing 3 changed files
... ...
@@ -456,7 +456,6 @@ int cli_scandmg(cli_ctx *ctx)
456 456
     }
457 457
 
458 458
     xmlFreeTextReader(reader);
459
-    xmlCleanupParser();
460 459
 
461 460
 #else
462 461
 
... ...
@@ -297,6 +297,9 @@ int cl_init(unsigned int initoptions)
297 297
     rc = bytecode_init();
298 298
     if (rc)
299 299
 	return rc;
300
+#ifdef HAVE_LIBXML2
301
+    xmlInitParser();
302
+#endif
300 303
     return CL_SUCCESS;
301 304
 }
302 305
 
... ...
@@ -823,7 +823,6 @@ int cli_scanxar(cli_ctx *ctx)
823 823
  exit_reader:
824 824
     xmlTextReaderClose(reader);
825 825
     xmlFreeTextReader(reader);
826
-    xmlCleanupParser();
827 826
 
828 827
  exit_toc:
829 828
     free(toc);