diff --git a/ChangeLog b/ChangeLog index 8ca31e20..86870c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Oct 13 12:27:22 CEST 2006 Daniel Veillard + + * 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 + Thu Oct 12 23:07:43 CEST 2006 Rob Richards * xmlIO.c: fix Windows compile - missing xmlWrapOpen. diff --git a/parser.c b/parser.c index ea957128..a79e27a7 100644 --- a/parser.c +++ b/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); } diff --git a/testapi.c b/testapi.c index ec094219..815ed546 100644 --- a/testapi.c +++ b/testapi.c @@ -14,6 +14,7 @@ #include #endif +#include /* for putenv() */ #include #include #include @@ -126,6 +127,9 @@ int main(int argc, char **argv) { int ret; int blocks, mem; + /* access to the proxy can slow up regression tests a lot */ + putenv("http_proxy="); + memset(chartab, 0, sizeof(chartab)); strncpy((char *) chartab, " chartab\n", 20); memset(inttab, 0, sizeof(inttab));