From 8de231131c1bc6697047058631fc8a01d57c4644 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 30 May 2023 17:50:56 +0200 Subject: [PATCH] gtkselectioninputstream-x11: Do not add an extra reference to the returned stream We create a new stream during gdk_x11_selection_input_stream_new_async() then such stream is referenced when passed to the task via g_task_return_pointer(), so there's no need to reference it again before returning it, or we'd end up leaking. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892 --- gdk/x11/gdkselectioninputstream-x11.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gdk/x11/gdkselectioninputstream-x11.c b/gdk/x11/gdkselectioninputstream-x11.c index 0f4ce37d4c..5d480cf6ab 100644 --- a/gdk/x11/gdkselectioninputstream-x11.c +++ b/gdk/x11/gdkselectioninputstream-x11.c @@ -577,7 +577,6 @@ gdk_x11_selection_input_stream_new_finish (GAsyncResult *result, *type = priv->type; if (format) *format = priv->format; - g_object_ref (stream); } return G_INPUT_STREAM (stream); -- 2.30.2