summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-02-26 16:54:03 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2023-02-26 16:55:37 +0100
commit282bb94471cbb29fb46bbfb06d716071bb4c3816 (patch)
tree9739f1513a5d5c8415531677b9817e68686b4cc6
parent75074d0e8aadd62f9292673038f120ed3d3d1439 (diff)
downloadlibxslt-282bb94471cbb29fb46bbfb06d716071bb4c3816.tar.gz
malloc-fail: Fix memory leak in exsltFuncRegisterImportFunc
Found with libFuzzer, see #84.
-rw-r--r--libexslt/functions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libexslt/functions.c b/libexslt/functions.c
index dc9bdb71..9497d7e0 100644
--- a/libexslt/functions.c
+++ b/libexslt/functions.c
@@ -114,6 +114,7 @@ exsltFuncRegisterImportFunc (void *payload, void *vctxt,
xsltGenericError(xsltGenericErrorContext,
"Failed to register function {%s}%s\n",
URI, name);
+ xmlFree(func);
} else { /* Do the registration */
xsltGenericDebug(xsltGenericDebugContext,
"exsltFuncRegisterImportFunc: register {%s}%s\n",