oops last commit introduced a memory leak. Daniel
* HTMLparser.c: oops last commit introduced a memory leak.
Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index f65084b..7f3ed47 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -5347,14 +5347,10 @@
{
htmlParserCtxtPtr ctxt;
htmlParserInputPtr inputStream;
- xmlParserInputBufferPtr buf;
char *canonicFilename;
/* htmlCharEncoding enc; */
xmlChar *content, *content_line = (xmlChar *) "charset=";
- buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
- if (buf == NULL) return(NULL);
-
ctxt = (htmlParserCtxtPtr) xmlMalloc(sizeof(htmlParserCtxt));
if (ctxt == NULL) {
xmlGenericError(xmlGenericErrorContext, "malloc failed\n");
@@ -5367,6 +5363,7 @@
if (xmlDefaultSAXHandler.error != NULL) {
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
}
+ xmlFreeParserCtxt(ctxt);
return(NULL);
}