diff options
| author | Rob Richards <rrichards@php.net> | 2008-05-04 15:15:01 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2008-05-04 15:15:01 +0000 |
| commit | f5bf8c94f728b45baa33859fa3956a69abe9a75d (patch) | |
| tree | dca67285e6878e8c6c8a753c59bbee8fc6102095 /ext/xsl | |
| parent | 8e23d6894231ca3c2b3e3e797d81047e5962456c (diff) | |
| download | php-git-f5bf8c94f728b45baa33859fa3956a69abe9a75d.tar.gz | |
MFH: fix bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
Diffstat (limited to 'ext/xsl')
| -rw-r--r-- | ext/xsl/xsltprocessor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 5baf9120c1..5ef37f4658 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -280,7 +280,9 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t } break; default: - ZVAL_STRING(args[i], xmlXPathCastToString(obj), 1); + str = xmlXPathCastToString(obj); + ZVAL_STRING(args[i], str, 1); + xmlFree(str); } xmlXPathFreeObject(obj); fci.params[i] = &args[i]; |
