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
 [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

Pull Requests

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: Sat Dec 21 14:01:32 2024 UTC