cvs: php-src(PHP_5_3) /ext/spl/tests iterator_041b.phpt ZendEngine2 zend_exceptions.c
| From: | Dmitry Stogov | Date: | Tue, 29 Jul 2008 14:28:11 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/spl/tests iterator_041b.phpt ZendEngine2 zend_exceptions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-51733@lists.php.net to get a copy of this message | ||
dmitry Tue Jul 29 14:28:11 2008 UTC
Modified files: (Branch: PHP_5_3)
/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.79.2.6.2.9.2.12&r2=1.79.2.6.2.9.2.13&diff_format=u
Index: ZendEngine2/zend_exceptions.c
diff -u ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.12
ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.13
--- ZendEngine2/zend_exceptions.c:1.79.2.6.2.9.2.12 Thu Jul 24 19:52:23 2008
+++ ZendEngine2/zend_exceptions.c Tue Jul 29 14:28:11 2008
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.12 2008/07/24 19:52:23 felipe Exp $ */
+/* $Id: zend_exceptions.c,v 1.79.2.6.2.9.2.13 2008/07/29 14:28:11 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.1.2.4.2.1&r2=1.1.2.4.2.2&diff_format=u
Index: php-src/ext/spl/tests/iterator_041b.phpt
diff -u php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.4.2.1
php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.4.2.2
--- php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.4.2.1 Sat May 24 14:10:44 2008
+++ php-src/ext/spl/tests/iterator_041b.phpt Tue Jul 29 14:28:11 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===