mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
tried to fix #102800 for good. Reenabled memory debug checking which got
* xsltproc/xsltproc.c: tried to fix #102800 for good. Reenabled memory debug checking which got deactivated at some point ?!? * libexslt/date.c libxslt/attributes.c: fixing some memory leaks * libxslt/xsltutils.c: very small change on HTML indentation handling Daniel
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
Thu Jan 9 18:17:40 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xsltproc/xsltproc.c: tried to fix #102800 for good. Reenabled
|
||||
memory debug checking which got deactivated at some point ?!?
|
||||
* libexslt/date.c libxslt/attributes.c: fixing some memory leaks
|
||||
* libxslt/xsltutils.c: very small change on HTML indentation handling
|
||||
|
||||
Thu Jan 9 14:28:19 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* tests/REC/test-8-1.xsl tests/REC/test-9.1-2.xsl
|
||||
|
@@ -1656,8 +1656,10 @@ _exsltDateAddDuration (exsltDateValPtr x, exsltDateValPtr y)
|
||||
if ((((ret->value.dur.day > 0) || (ret->value.dur.sec > 0)) &&
|
||||
(ret->value.dur.mon < 0)) ||
|
||||
(((ret->value.dur.day < 0) || (ret->value.dur.sec < 0)) &&
|
||||
(ret->value.dur.mon > 0)))
|
||||
(ret->value.dur.mon > 0))) {
|
||||
exsltDateFreeDate(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2775,8 +2777,11 @@ exsltDateDifference (const xmlChar *xstr, const xmlChar *ystr)
|
||||
}
|
||||
|
||||
if (((x->type < XS_GYEAR) || (x->type > XS_DATETIME)) ||
|
||||
((y->type < XS_GYEAR) || (y->type > XS_DATETIME)))
|
||||
((y->type < XS_GYEAR) || (y->type > XS_DATETIME))) {
|
||||
exsltDateFreeDate(x);
|
||||
exsltDateFreeDate(y);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dur = _exsltDateDifference(x, y, 0);
|
||||
|
||||
|
@@ -170,6 +170,7 @@ xsltAddAttrElemList(xsltAttrElemPtr list, xmlNodePtr attr) {
|
||||
return(cur);
|
||||
if (cur->next == NULL) {
|
||||
cur->next = xsltNewAttrElem(attr);
|
||||
return(list);
|
||||
}
|
||||
cur = next;
|
||||
}
|
||||
@@ -372,15 +373,17 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
|
||||
values2->set = ncname2;
|
||||
values2->ns = prefix2;
|
||||
values = xsltMergeAttrElemList(values, values2);
|
||||
}
|
||||
|
||||
if (attrib != NULL)
|
||||
xmlFree(attrib);
|
||||
xsltFreeAttrElem(values2);
|
||||
} else {
|
||||
if (ncname2 != NULL)
|
||||
xmlFree(ncname2);
|
||||
if (prefix2 != NULL)
|
||||
xmlFree(prefix2);
|
||||
}
|
||||
|
||||
if (attrib != NULL)
|
||||
xmlFree(attrib);
|
||||
}
|
||||
attrib = endattr;
|
||||
}
|
||||
xmlFree(attributes);
|
||||
|
@@ -1081,7 +1081,7 @@ xsltSaveResultTo(xmlOutputBufferPtr buf, xmlDocPtr result,
|
||||
} else {
|
||||
htmlSetMetaEncoding(result, (const xmlChar *) "UTF-8");
|
||||
}
|
||||
if (indent != 0)
|
||||
if (indent == -1)
|
||||
indent = 1;
|
||||
htmlDocContentDumpFormatOutput(buf, result, (const char *) encoding,
|
||||
indent);
|
||||
|
@@ -547,7 +547,13 @@ main(int argc, char **argv)
|
||||
(!strcmp(argv[i], "-output")) ||
|
||||
(!strcmp(argv[i], "--output"))) {
|
||||
i++;
|
||||
#if defined(WIN32)
|
||||
output = xmlNormalizeWindowsPath(argv[i]);
|
||||
if (output == NULL)
|
||||
output = xmlStrdup(argv[i]);
|
||||
#else
|
||||
output = argv[i];
|
||||
#endif
|
||||
} else if ((!strcmp(argv[i], "-V")) ||
|
||||
(!strcmp(argv[i], "-version")) ||
|
||||
(!strcmp(argv[i], "--version"))) {
|
||||
@@ -815,17 +821,19 @@ main(int argc, char **argv)
|
||||
xsltProcess(doc, cur, argv[i]);
|
||||
}
|
||||
}
|
||||
done:
|
||||
if (cur != NULL)
|
||||
xsltFreeStylesheet(cur);
|
||||
for (i = 0;i < nbstrparams;i++)
|
||||
xmlFree(strparams[i]);
|
||||
done:
|
||||
xsltCleanupGlobals();
|
||||
xmlCleanupParser();
|
||||
#if 0
|
||||
xmlMemoryDump();
|
||||
#if defined(WIN32)
|
||||
if (output != NULL)
|
||||
xmlFree(output);
|
||||
#endif
|
||||
xsltFreeSecurityPrefs(sec);
|
||||
xsltCleanupGlobals();
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
return(errorno);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user