tony2001                Fri Oct 17 22:10:27 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/spl    spl_array.c 
  Log:
  MFH: fix memleak
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.18&r2=1.71.2.17.2.19&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.18 
php-src/ext/spl/spl_array.c:1.71.2.17.2.19
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.18  Mon Oct  6 13:45:42 2008
+++ php-src/ext/spl/spl_array.c Fri Oct 17 22:10:27 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_array.c,v 1.71.2.17.2.18 2008/10/06 13:45:42 colder Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17.2.19 2008/10/17 22:10:27 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1205,6 +1205,8 @@
        
        if (use_arg) {
                if (ZEND_NUM_ARGS() != 1 || 
zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, 
"z", &arg) == FAILURE) {
+                       Z_TYPE_P(tmp) = IS_NULL;
+                       zval_ptr_dtor(&tmp);
                        zend_throw_exception(spl_ce_BadMethodCallException, 
"Function expects exactly one argument", 0 TSRMLS_CC);
                        return;
                }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to