php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11304 memory leak
Submitted: 2001-06-06 02:15 UTC Modified: 2001-08-20 10:40 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
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: tgagne at efinnet dot com
New email:
PHP Version: OS:

 

 [2001-06-06 02:15 UTC] tgagne at efinnet dot com
php_domxml.c, line #698

The pointer (content) from xmlNodeGetContent(last); needs to be freed.  There's still another memory leak in domxml but it leaks much slower now.  To my version of the file I added:

if (content) {
    add_property_stringl(child, "content", (char *) content, strlen(content), 1);
    free(content);
}

directly beneath it.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-06 02:18 UTC] tgagne at efinnet dot com
This (I think) is a new bug with libxml2.so (libxml2-2.3.9-1)
 [2001-07-17 10:49 UTC] joey@php.net
This is great. Do you have a test case for this bug?
 [2001-08-20 10:40 UTC] sniper@php.net
No feedback. Reopen if you still have this problem
with PHP 4.0.7 (soon to be released) or with latest CVS 
snapshot from http://snaps.php.net/

Side note: The libxml version required now is libxml2-2.4.2

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC