php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37707 clone without assigning leaks memory
Submitted: 2006-06-05 23:16 UTC Modified: 2006-06-07 13:44 UTC
From: nlopess@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2006-06-05 (CVS) OS: n/a
Private report: No CVE-ID: None
 [2006-06-05 23:16 UTC] nlopess@php.net
Description:
------------
cloning an object without assigning the return value to a variable leaks memory.

Reproduce code:
---------------
<?
class xpto {}

clone new xpto();

/* or:
$a = new xpto();
clone $a;
*/


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-05 23:17 UTC] nlopess@php.net
so here it goes..
 [2006-06-05 23:48 UTC] nlopess@php.net
I even made a patch =) : http://mega.ist.utl.pt/~ncpl/zend_clone_memleak.txt
 [2006-06-07 13:44 UTC] iliaa@php.net
This bug has been fixed in CVS.

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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC