dmitry          Tue Jul 29 14:27:31 2008 UTC

  Modified files:              
    /ZendEngine2        zend_exceptions.c 
    /php-src/ext/spl/tests      iterator_041b.phpt 
  Log:
  Fixed memory leak
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_exceptions.c?r1=1.123&r2=1.124&diff_format=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.123 ZendEngine2/zend_exceptions.c:1.124
--- ZendEngine2/zend_exceptions.c:1.123 Thu Jul 24 19:50:22 2008
+++ ZendEngine2/zend_exceptions.c       Tue Jul 29 14:27:31 2008
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_exceptions.c,v 1.123 2008/07/24 19:50:22 felipe Exp $ */
+/* $Id: zend_exceptions.c,v 1.124 2008/07/29 14:27:31 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -52,6 +52,7 @@
                previous = zend_read_property(default_exception_ce, exception, 
"previous", sizeof("previous")-1, 1 TSRMLS_CC);
                if (Z_TYPE_P(previous) == IS_NULL) {
                        zend_update_property(default_exception_ce, exception, 
"previous", sizeof("previous")-1, add_previous TSRMLS_CC);
+                       Z_DELREF_P(add_previous);
                        return;
                }
                exception = previous;
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/iterator_041b.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/spl/tests/iterator_041b.phpt
diff -u php-src/ext/spl/tests/iterator_041b.phpt:1.4 
php-src/ext/spl/tests/iterator_041b.phpt:1.5
--- php-src/ext/spl/tests/iterator_041b.phpt:1.4        Sat May 24 14:12:00 2008
+++ php-src/ext/spl/tests/iterator_041b.phpt    Tue Jul 29 14:27:31 2008
@@ -101,5 +101,10 @@
 State 4: current()
 State 5: key()
 State 6: next()
-
-Fatal error: Ignoring exception from MyArrayIterator::__destruct() while an 
exception is already active (Uncaught Exception in %s on line %d) in 
%siterator_041b.php on line %d
+===iterator_count===
+State 0: __construct()
+State 1: __construct()
+State 2: rewind()
+State 3: valid()
+State 6: next()
+===DONE===



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

Reply via email to