After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598922 - memory leak for bad xml file
memory leak for bad xml file
Status: RESOLVED WONTFIX
Product: bug-buddy
Classification: Deprecated
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Bug-buddy Maintainers
Bug-buddy Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2009-10-19 13:10 UTC by Pavol Rusnak
Modified: 2018-07-16 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavol Rusnak 2009-10-19 13:10:24 UTC
We've received the following report from a reporter:

-------

I just had a look at factory package bug-buddy-2.28.0-1.1
source code file bug-buddy-2.28.0/src/bug-buddy.c
function get_gnome_version_info

I notice the following code

        version = g_new0 (GnomeVersionInfo, 1);

        xml_file = g_build_filename (DATADIR, "gnome-about/gnome-version.xml",
NULL);

        doc = xmlParseFile (xml_file);
        g_free (xml_file);

        if (!doc)
                return NULL;

so if the xmlParseFile returns NULL, then the return is taken and local
variable
version has not been freed, which causes a memory leak. Suggest new code

        version = g_new0 (GnomeVersionInfo, 1);

        xml_file = g_build_filename (DATADIR, "gnome-about/gnome-version.xml",
NULL);

        doc = xmlParseFile (xml_file);
        g_free (xml_file);

        if (!doc)
        {
                g_free( version);
                return NULL;
        }
Comment 1 André Klapper 2018-07-16 08:25:55 UTC
bug-buddy is not under active development anymore and had its last code changes
many years ago. Its codebase has been archived:
https://gitlab.gnome.org/Archive/bug-buddy/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality (see bug 796784). Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.