From 25f8793a35891a5b95002212ac818bf2fe4f0231 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 30 May 2023 17:43:57 +0200 Subject: [PATCH] gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue This should never happen, but we may exit the loop because of count value with an unreffed bytes pointer being added back to the chunks queue. --- gdk/x11/gdkselectioninputstream-x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/x11/gdkselectioninputstream-x11.c b/gdk/x11/gdkselectioninputstream-x11.c index 7ea92ef368..0f4ce37d4c 100644 --- a/gdk/x11/gdkselectioninputstream-x11.c +++ b/gdk/x11/gdkselectioninputstream-x11.c @@ -107,7 +107,7 @@ gdk_x11_selection_input_stream_fill_buffer (GdkX11SelectionInputStream *stream, memcpy (buffer, g_bytes_get_data (bytes, NULL), size); } - g_bytes_unref (bytes); + g_bytes_unref (g_steal_pointer (&bytes)); result += size; if (buffer) buffer += size; -- 2.30.2