[xml] xmlCleanupParser patch



The double-free() I was getting by calling xmlCleanupParser()
twice - dumb, yes - would have been saved by this one liner
(against current CVS).

-------------------------------------------------------------------
*** parser.c.~1.279.~   Thu Jan  1 01:00:01 1970
--- parser.c    Sun Aug 17 21:00:45 2003
***************
*** 11182,11187 ****
--- 11182,11190 ----
  
  void
  xmlCleanupParser(void) {
+     if (!xmlParserInitialized)
+       return;
+ 
      xmlCleanupCharEncodingHandlers();
      xmlCleanupPredefinedEntities();
  #ifdef LIBXML_CATALOG_ENABLED
-------------------------------------------------------------------

Maybe could help others?  There's a check for double initialising
but not double cleanup.

Cheers

Dave



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]