[gtk+/wip/wayland-dnd-actions: 21/23] wayland: Plug leak



commit 3a91acac87e889003776997370563211482f9273
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Apr 7 16:58:01 2015 +0200

    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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c
index fd50c01..dd8a4c4 100644
--- a/gdk/wayland/gdkdnd-wayland.c
+++ b/gdk/wayland/gdkdnd-wayland.c
@@ -425,6 +425,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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]