From f3f4d40b89c57b6f8c82a4376e5dc0935a6dfb6c Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 28 Jun 2018 11:13:33 +0100 Subject: [PATCH] wayland: Fix memory leak in server decoration object The server decoration object becomes invaid when the wl_surface is deleted. We should tidy it up then. --- gdk/wayland/gdkwindow-wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index eba0f37f97..9ae45231ae 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -3108,6 +3108,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window) impl->application.was_set = FALSE; } + if (impl->display_server.server_decoration) + { + org_kde_kwin_server_decoration_release (impl->display_server.server_decoration); + impl->display_server.server_decoration = NULL; + } + wl_surface_destroy (impl->display_server.wl_surface); impl->display_server.wl_surface = NULL;