Commit a7e05b4f authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Martin Stoilov pointed out a potential leak in xmlCreateMemoryParserCtxt

* parser.c: Martin Stoilov pointed out a potential leak in
  xmlCreateMemoryParserCtxt
Daniel
parent bc6e1a38
Tue Nov 19 09:09:04 CET 2002 Daniel Veillard <daniel@veillard.com>
* parser.c: Martin Stoilov pointed out a potential leak in
xmlCreateMemoryParserCtxt
Mon Nov 18 16:05:51 CET 2002 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: fixed bug #98879 a corner case when 0 is
......
......@@ -10483,10 +10483,14 @@ xmlCreateMemoryParserCtxt(const char *buffer, int size) {
return(NULL);
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
if (buf == NULL) return(NULL);
if (buf == NULL) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
input = xmlNewInputStream(ctxt);
if (input == NULL) {
xmlFreeParserInputBuffer(buf);
xmlFreeParserCtxt(ctxt);
return(NULL);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment