rrichards               Sun May  4 15:14:23 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /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.9.2.7&r2=1.39.2.2.2.9.2.8&diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.7 
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.8
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.7    Tue Jan 29 21:21:20 2008
+++ php-src/ext/xsl/xsltprocessor.c     Sun May  4 15:14:23 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.7 2008/01/29 21:21:20 sebastian Exp $ 
*/
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.8 2008/05/04 15:14:23 rrichards Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -286,7 +286,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

Reply via email to