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.
This commit is contained in:
Marco Trevisan (Treviño)
2023-05-30 17:43:57 +02:00
parent 468d2cb7f2
commit bce1e0bfdd

View File

@@ -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;