GNOME Bugzilla – Bug 563427
gui/simple-greeter/gdm-sessions.c:181: Memory leak: id
Last modified: 2008-12-08 20:07:52 UTC
Svn revision 6623 In file gui/simple-greeter/gdm-sessions.c:181 Variable "id" seems to be leaking memory. Memory is allocated with g_strndup() but not freed anywhere. load_session_file() seems to just make copies of it. while ((filename = g_dir_read_name (dir))) { char *id; char *full_path; if (! g_str_has_suffix (filename, ".desktop")) { continue; } id = g_strndup (filename, strlen (filename) - strlen (".desktop")); full_path = g_build_filename (dirname, filename, NULL); load_session_file (id, full_path); g_free (full_path); } Leak was found using cppcheck: http://cppcheck.wiki.sourceforge.net/
Created attachment 124047 [details] [review] patch that fixes this bug.
thanks, feel free to commit
Thanks, Ray! Commited.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.