From d056be4ea238e6f4371230b1a892ed0100770848 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 6 May 2018 17:06:57 +0200 Subject: [PATCH] wayland: Fix memleak 7f8a8f221d60bc5da23602e5e024eb91f8b0f758 forgot to free the data offer passed to it. --- gdk/wayland/gdkdnd-wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 81ed3505a8..9138e5eb98 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -85,7 +85,8 @@ gdk_wayland_drag_context_finalize (GObject *object) } if (wayland_context->data_source) - wl_data_source_destroy (wayland_context->data_source); + g_clear_pointer (&wayland_context->data_source, (GDestroyNotify) wl_data_source_destroy); + g_clear_pointer (&wayland_context->offer, (GDestroyNotify) wl_data_offer_destroy); dnd_surface = wayland_context->dnd_surface;