GNOME Bugzilla – Bug 598922
memory leak for bad xml file
Last modified: 2018-07-16 08:25:55 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; }
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.