From 013c7f1f922fce5e982855a62ee60ac943dda55c Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 17 Feb 2009 17:09:05 +0000 Subject: [PATCH] Fixed bug #45327 (memory leak if offsetGet throws exception) # Patch by Greg --- Zend/zend_object_handlers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 5da47bb490..9fd7db1b80 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -472,6 +472,10 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) } return 0; } + if (EG(exception)) { + zval_ptr_dtor(&retval); + return 0; + } /* Undo PZVAL_LOCK() */ retval->refcount--; -- 2.50.1