[gtk: 1/2] Fix resource leak in gdk_display_close() under Wayland
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Fix resource leak in gdk_display_close() under Wayland
- Date: Mon, 31 Aug 2020 16:17:06 +0000 (UTC)
commit 665955b81eb3b190e8e49bb26638a6928ad96af7
Author: Julien Ropé <jrope redhat com>
Date: Mon Aug 31 17:26:18 2020 +0200
Fix resource leak in gdk_display_close() under Wayland
When using the gdk_display_close(), the handle to the Wayland compositor was not released. This could
cause the consumption of all available handles, preventing other processes from accessing the display.
Fixing this by calling wl_display_disconnect() when releasing the GdkWaylandDisplay object.
Signed-off-by: Julien Ropé <jrope redhat com>
gdk/wayland/gdkdisplay-wayland.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 9be0bacfad..035eec5819 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -755,6 +755,8 @@ gdk_wayland_display_finalize (GObject *object)
g_clear_object (&display_wayland->settings_portal);
+ wl_display_disconnect (display_wayland->wl_display);
+
G_OBJECT_CLASS (gdk_wayland_display_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]