[gtk+] gdkdisplay-wayland: Fix some memory leaks
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdkdisplay-wayland: Fix some memory leaks
- Date: Thu, 8 Sep 2016 09:34:08 +0000 (UTC)
commit 476c1c44a5c52b21312515327ec0b671b34bb79b
Author: Timm Bäder <mail baedert org>
Date: Thu Sep 8 10:45:25 2016 +0200
gdkdisplay-wayland: Fix some memory leaks
gdk/wayland/gdkdisplay-wayland.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 3566d69..cddb2de 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -612,12 +612,24 @@ static void
gdk_wayland_display_finalize (GObject *object)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (object);
+ guint i;
_gdk_wayland_display_finalize_cursors (display_wayland);
g_object_unref (display_wayland->screen);
g_free (display_wayland->startup_notification_id);
+ g_free (display_wayland->cursor_theme_name);
+ xkb_context_unref (display_wayland->xkb_context);
+
+ for (i = 0; i < GDK_WAYLAND_THEME_SCALES_COUNT; i++)
+ {
+ if (display_wayland->scaled_cursor_themes[i])
+ {
+ wl_cursor_theme_destroy (display_wayland->scaled_cursor_themes[i]);
+ display_wayland->scaled_cursor_themes[i] = NULL;
+ }
+ }
g_ptr_array_free (display_wayland->monitors, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]