rrichards Sun May 4 15:15:01 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/xsl xsltprocessor.c
Log:
MFH: fix bug #44891 Memory leak using registerPHPFunctions and XSLT Variable
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.39.2.2.2.13&r2=1.39.2.2.2.14&diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.13
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.14
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.13 Tue Jan 29 21:21:28 2008
+++ php-src/ext/xsl/xsltprocessor.c Sun May 4 15:15:01 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.13 2008/01/29 21:21:28 sebastian Exp $ */
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.14 2008/05/04 15:15:01 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -280,7 +280,9 @@
}
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];
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php