Edit report at http://bugs.php.net/bug.php?id=52614&edit=1
ID: 52614 Updated by: dmi...@php.net Reported by: fel...@php.net Summary: Memory leak when writing on uninitialized variable returned from method call -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem PHP Version: Irrelevant Assigned To: dmitry Block user comment: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2010-08-25 11:14:38] dmi...@php.net Automatic comment from SVN on behalf of dmitry Revision: http://svn.php.net/viewvc/?view=revision&revision=302764 Log: Fixed bug #52614 (Memory leak when writing on uninitialized variable returned from method call) ------------------------------------------------------------------------ [2010-08-15 19:12:43] fel...@php.net Description: ------------ See below. It is just like the #52041, but on method calls. Test script: --------------- <?php class foo { public $x; public function test() { return $this->x; } } $foo = new foo; $foo->test()->a = 1; Expected result: ---------------- No memory leak Actual result: -------------- [Sun Aug 15 14:09:42 2010] Script: '../bug.php' /home/felipe/dev/phptrunk/Zend/zend_execute.c(693) : Freeing 0xB7C09524 (20 bytes), script=../bug.php === Total 1 memory leaks detected === ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52614&edit=1