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