Edit report at http://bugs.php.net/bug.php?id=52041&edit=1

 ID:               52041
 Updated by:       dmi...@php.net
 Reported by:      fel...@php.net
 Summary:          Memory leak when writing on uninitialized variable
                   returned from function
-Status:           Assigned
+Status:           Closed
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: Linux
 PHP Version:      5.2, 5.3, Trunk
 Assigned To:      dmitry

 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-06-15 10:22:55] dmi...@php.net

Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=300457
Log: Fixed bug #52041 (Memory leak when writing on uninitialized
variable returned from function)

------------------------------------------------------------------------
[2010-06-10 19:19:47] fel...@php.net

It is also reproducible with:

foo()[] = 1;

------------------------------------------------------------------------
[2010-06-10 19:18:05] fel...@php.net

Description:
------------
See below.

Test script:
---------------
<?php



function foo() {

        return $x;

}



foo()->a = 1;

Expected result:
----------------
No memory leak.

Actual result:
--------------
Zend/zend_execute.c(723) :  Freeing 0x0A395E1C (20 bytes),
script=../bug.php

=== Total 1 memory leaks detected ===


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52041&edit=1

Reply via email to