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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 15:01:28 2020 UTC