From 49a7bf267b64c6364e420bf2836f34cfa9d1d57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 6 Mar 2018 19:47:18 +0100 Subject: GdkSelectionOutputStreamX11: Plug a memory leak --- gdk/x11/gdkselectionoutputstream-x11.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdk') diff --git a/gdk/x11/gdkselectionoutputstream-x11.c b/gdk/x11/gdkselectionoutputstream-x11.c index 3587b95be7..106c6b780c 100644 --- a/gdk/x11/gdkselectionoutputstream-x11.c +++ b/gdk/x11/gdkselectionoutputstream-x11.c @@ -93,6 +93,12 @@ gdk_x11_pending_selection_notify_new (Window window, return pending; } +static void +gdk_x11_pending_selection_notify_free (GdkX11PendingSelectionNotify *notify) +{ + g_slice_free (GdkX11PendingSelectionNotify, notify); +} + static void gdk_x11_pending_selection_notify_require (GdkX11PendingSelectionNotify *notify, guint n_sends) @@ -145,6 +151,8 @@ gdk_x11_pending_selection_notify_send (GdkX11PendingSelectionNotify *notify, gdk_x11_get_xatom_name_for_display (display, notify->xevent.target), error)); } + + gdk_x11_pending_selection_notify_free (notify); } static gboolean -- cgit v1.2.1