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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nlopess@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Nov 21 12:01:29 2024 UTC