mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
fixed xmlIOParseDTD handling of @input in error case, Should fix #335085
* parser.c: fixed xmlIOParseDTD handling of @input in error case, Should fix #335085 * testapi.c: reset the http_proxy env variable to not waste time on regression tests Daniel
This commit is contained in:
4
parser.c
4
parser.c
@@ -10827,7 +10827,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
|
||||
* Load and parse a DTD
|
||||
*
|
||||
* Returns the resulting xmlDtdPtr or NULL in case of error.
|
||||
* @input will be freed at parsing end.
|
||||
* @input will be freed by the function in any case.
|
||||
*/
|
||||
|
||||
xmlDtdPtr
|
||||
@@ -10843,6 +10843,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
|
||||
|
||||
ctxt = xmlNewParserCtxt();
|
||||
if (ctxt == NULL) {
|
||||
xmlFreeParserInputBuffer(input);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -10864,6 +10865,7 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
|
||||
pinput = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
|
||||
if (pinput == NULL) {
|
||||
if (sax != NULL) ctxt->sax = NULL;
|
||||
xmlFreeParserInputBuffer(input);
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user