1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-07 10:42:55 +03:00

Fix memory leaks in EXSLT error paths

Found with libFuzzer and ASan.
This commit is contained in:
Nick Wellnhofer
2017-05-21 00:16:54 +02:00
parent b89ec93541
commit ac29e4bdcd
3 changed files with 19 additions and 36 deletions

View File

@@ -540,6 +540,7 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
xsltGenericError(xsltGenericErrorContext,
"exsltFuncFunctionComp: no stylesheet data\n");
xmlFree(name);
xmlFree(func);
return;
}
@@ -548,6 +549,7 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
"Failed to register function {%s}%s\n",
ns->href, name);
style->errors++;
xmlFree(func);
} else {
xsltGenericDebug(xsltGenericDebugContext,
"exsltFuncFunctionComp: register {%s}%s\n",