From 42f096c846b813aedf92979ec438686c78168f62 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 7 Apr 2015 16:58:01 +0200 Subject: [PATCH] wayland: Plug leak We leak refs on the dest window if it gets set multiple times, expected to happen as the DnD operation moves across the window. --- gdk/wayland/gdkdnd-wayland.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index f558bb5240..71e8e49764 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -418,6 +418,9 @@ _gdk_wayland_drag_context_set_dest_window (GdkDragContext *context, GdkWindow *dest_window, uint32_t serial) { + if (context->dest_window) + g_object_unref (context->dest_window); + context->dest_window = dest_window ? g_object_ref (dest_window) : NULL; GDK_WAYLAND_DRAG_CONTEXT (context)->serial = serial; gdk_wayland_drop_context_update_targets (context);