cvs: ZendEngine2(PHP_5_2) / zend_object_handlers.c
| From: | Ilia Alshanetsky | Date: | Tue, 17 Feb 2009 17:09:05 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_2) / zend_object_handlers.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-7413@lists.php.net to get a copy of this message | ||
iliaa Tue Feb 17 17:09:05 2009 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_object_handlers.c
Log:
Fixed bug #45327 (memory leak if offsetGet throws exception)
# Patch by Greg
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_object_handlers.c?r1=1.135.2.6.2.31&r2=1.135.2.6.2.32&diff_format=u
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.135.2.6.2.31
ZendEngine2/zend_object_handlers.c:1.135.2.6.2.32
--- ZendEngine2/zend_object_handlers.c:1.135.2.6.2.31 Thu Jan 8 00:39:15 2009
+++ ZendEngine2/zend_object_handlers.c Tue Feb 17 17:09:05 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.135.2.6.2.31 2009/01/08 00:39:15 andrei Exp $ */
+/* $Id: zend_object_handlers.c,v 1.135.2.6.2.32 2009/02/17 17:09:05 iliaa Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -472,6 +472,10 @@
}
return 0;
}
+ if (EG(exception)) {
+ zval_ptr_dtor(&retval);
+ return 0;
+ }
/* Undo PZVAL_LOCK() */
retval->refcount--;