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:
@@ -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",
|
||||
|
Reference in New Issue
Block a user