[Bug 546039] New: bug-buddy-2.28.0-1.1: memory leak for bad xml file
http://bugzilla.novell.com/show_bug.cgi?id=546039 Summary: bug-buddy-2.28.0-1.1: memory leak for bad xml file Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- 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; } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=546039
Andreas Jaeger
http://bugzilla.novell.com/show_bug.cgi?id=546039
User rguenther@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=546039#c1
--- Comment #1 from Richard Guenther
http://bugzilla.novell.com/show_bug.cgi?id=546039
User prusnak@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=546039#c2
Pavol Rusnak
participants (1)
-
bugzilla_noreply@novell.com