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

malloc-fail: Fix null deref in exsltFuncShutdown

Found with libFuzzer, see #84.
This commit is contained in:
Nick Wellnhofer
2023-02-26 16:53:25 +01:00
parent 0c1f04f036
commit 293067bc3e

View File

@@ -185,10 +185,12 @@ exsltFuncShutdown (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED,
void *vdata) { void *vdata) {
exsltFuncData *data = (exsltFuncData *) vdata; exsltFuncData *data = (exsltFuncData *) vdata;
if (data != NULL) {
if (data->result != NULL) if (data->result != NULL)
xmlXPathFreeObject(data->result); xmlXPathFreeObject(data->result);
xmlFree(data); xmlFree(data);
} }
}
/** /**
* exsltFuncStyleInit: * exsltFuncStyleInit: