]> granicus.if.org Git - php/commitdiff
Fixed memory leak
authorDmitry Stogov <dmitry@php.net>
Tue, 29 Jul 2008 14:28:11 +0000 (14:28 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 29 Jul 2008 14:28:11 +0000 (14:28 +0000)
Zend/zend_exceptions.c
ext/spl/tests/iterator_041b.phpt

index 5f725a4b72b59db5009d3abefe30f07968c3b12e..90b00d76d41092924068423c8c9c87e8cdbb4b67 100644 (file)
@@ -52,6 +52,7 @@ void zend_exception_set_previous(zval *add_previous TSRMLS_DC)
                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;
index f07164d08a898c25a7df1129a1d60755b602ab61..e166f6bdce2dc11ef811fa572f6a310006158091 100755 (executable)
@@ -101,5 +101,10 @@ State 3: valid()
 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===