Commit d6e347e8 authored by William M. Brack's avatar William M. Brack

Applied Daniel's fix for memory leak in dtd prefix (bug 300550). minor

* valid.c: Applied Daniel's fix for memory leak in dtd
  prefix (bug 300550).
* xpath.c: minor change to comment only
parent 18ffe20c
Fri Apr 15 09:33:21 HKT 2005 William Brack <wbrack@mmm.com.hk>
* valid.c: Applied Daniel's fix for memory leak in dtd
prefix (bug 300550).
* xpath.c: minor change to comment only
Thu Apr 14 20:52:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xmlmemory.c: added the call to the breakpoint routine
......
......@@ -1485,6 +1485,10 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
xmlFree(ns);
return(NULL);
}
if (ns != NULL) {
xmlFree(ns);
ns = NULL;
}
} else {
ret = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
if (ret == NULL) {
......
......@@ -5101,6 +5101,11 @@ xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) {
if ((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE) ||
(arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE)) {
/*
* If either argument is a XPATH_NODESET or XPATH_XSLT_TREE the two arguments
* are not freed from within this routine; they will be freed from the
* called routine, e.g. xmlXPathCompareNodeSets or xmlXPathCompareNodeSetValue
*/
if (((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE)) &&
((arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE))){
ret = xmlXPathCompareNodeSets(inf, strict, arg1, arg2);
......@@ -5113,10 +5118,6 @@ xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) {
arg2, arg1);
}
}
/*
* Note from Bill: I don't understand why, but arg1 and arg2 shouldn't be
* freed here!
*/
return(ret);
}
......
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