php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11354 docs allocated by xmlParseFile need to be freed
Submitted: 2001-06-08 06:32 UTC Modified: 2003-04-25 11:05 UTC
From: tgagne at efinnet dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.0.5 OS: RHat 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tgagne at efinnet dot com
New email:
PHP Version: OS:

 

 [2001-06-08 06:32 UTC] tgagne at efinnet dot com
In a loop:

while (somethings true) {
    $doc = xmlDocFile($xmlFile);
}

All the documents aren't freed until the CGI finishes.  Instead of waiting until the script finishes, the memory (which can be HUGE) must be deallocated as the variable gets reassigned.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-29 05:10 UTC] derick@php.net
Zeev, Andi,

is this possible with the Zend Engine at all? Are the
destructers called when a variabele is reassigned?

Derick
 [2001-11-22 02:51 UTC] derick@php.net
Suspended for now, as there is no imediate fix for this.
 [2003-04-25 11:05 UTC] sniper@php.net
This was about domxml, and it will have domdocument->free()
in it in PHP 4.3.2. This is already in CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC