Commit b48226f7 authored by Nick Wellnhofer's avatar Nick Wellnhofer
Browse files

Fix memory leaks in xmlParseStartTag2 error paths

Found by OSS-Fuzz.
parent 6b49db2c
......@@ -9247,7 +9247,8 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
xmlErrMemory(ctxt, "dictionary allocation failure");
if ((attvalue != NULL) && (alloc != 0))
xmlFree(attvalue);
return(NULL);
localname = NULL;
goto done;
}
if (*URL != 0) {
uri = xmlParseURI((const char *) URL);
......@@ -9497,7 +9498,8 @@ next_attr:
if ((atts == NULL) || (nbatts + 5 > maxatts)) {
if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
return(NULL);
localname = NULL;
goto done;
}
maxatts = ctxt->maxatts;
atts = ctxt->atts;
......
Markdown is supported
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