From: Marco Trevisan (TreviƱo) Date: Tue, 30 May 2023 15:50:56 +0000 (+0200) Subject: gtkselectioninputstream-x11: Do not add an extra reference to the returned stream X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~201^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=371e860184c95b9d6ec77369d5d6266072f32010;p=gtk4.git 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 --- 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);