• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/parser.c b/parser.c
2index 0f58bf7..bcf9a2e 100644
3--- a/parser.c
4+++ b/parser.c
5@@ -13877,8 +13877,8 @@ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax,
6     xmlFreeParserCtxt(ctxt);
7     newDoc->intSubset = NULL;
8     newDoc->extSubset = NULL;
9-    /* This leaks the namespace list if doc == NULL */
10-    newDoc->oldNs = NULL;
11+    if(doc != NULL)
12+        newDoc->oldNs = NULL;
13     xmlFreeDoc(newDoc);
14
15     return(ret);
16