GNOME Bugzilla – Bug 789984
Plug some leaks
Last modified: 2017-11-07 10:13:47 UTC
Been running gnome-shell on valgrind. No big fish, but I've found some leaks worth fixing (the one on page flip is small but potentially *very* frequent). Attaching some patches.
Created attachment 363077 [details] [review] compositor: Keep reference to the screen on the MetaBackground This is not a leak per se, but it seems too easy to make valgrind SIGSEGV due to MetaBackground disconnecting signals from an already destroyed MetaScreen when trying to SIGTERM gnome-shell. Keeping a reference fixes this.
Created attachment 363078 [details] [review] clutter: Plug evdev ClutterDeviceManager leaks The unused ID GList element is leaked, and so is the node path.
Created attachment 363079 [details] [review] wayland: Plug leak The remote DBus error is leaked.
Created attachment 363080 [details] [review] core: Plug leaks The MetaWorkspaceLogicalMonitorData structs are leaked, and so is the stamps hashtable in MetaDisplay.
Created attachment 363081 [details] [review] backends: Plug leaks The DRM properties container must be destroyed with drmModeFreeObjectProperties, and the connectors must be freed on every caller. Also make it sure that gbm_device structs are destroyed with the MetaRendererNativeGpuData that owns them.
Review of attachment 363081 [details] [review]: lgtm. does any of these needed for gnome-3-26 too?
Review of attachment 363080 [details] [review]: lgtm.
Review of attachment 363079 [details] [review]: lgtm. ::: src/wayland/meta-wayland.c @@ +278,3 @@ if (error) { + gchar *remote_error = g_dbus_error_get_remote_error (error); nit: s/gchar/char/ and newline after declaration
Review of attachment 363078 [details] [review]: lgtm
Review of attachment 363077 [details] [review]: lgtm
(In reply to Jonas Ådahl from comment #6) > Review of attachment 363081 [details] [review] [review]: > > lgtm. does any of these needed for gnome-3-26 too? After some inspection the first chunk does. The others don't which I guess is good, but breaks my working theory wrt gnome-shell memory growth. Oh well... (In reply to Jonas Ådahl from comment #8) > Review of attachment 363079 [details] [review] [review]: > nit: s/gchar/char/ and newline after declaration Did that :).
Pushed to master and gnome-3-26 Attachment 363077 [details] pushed as c2fad2d - compositor: Keep reference to the screen on the MetaBackground Attachment 363078 [details] pushed as c86c5d6 - clutter: Plug evdev ClutterDeviceManager leaks Attachment 363079 [details] pushed as 1809850 - wayland: Plug leak Attachment 363080 [details] pushed as 0a36a45 - core: Plug leaks Attachment 363081 [details] pushed as eb23664 - backends: Plug leaks