From: Marco Trevisan (TreviƱo) Date: Tue, 30 May 2023 15:43:57 +0000 (+0200) Subject: gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~3^2~1^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=25f8793a35891a5b95002212ac818bf2fe4f0231;p=gtk4.git 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. --- 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;