[gnome-remote-desktop] rdp: Unref frame when success is FALSE
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] rdp: Unref frame when success is FALSE
- Date: Thu, 3 Mar 2022 14:23:08 +0000 (UTC)
commit 229a659deeccef3238b69c520392dd09f1ec01d9
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Tue Jan 4 23:52:37 2022 +0100
rdp: Unref frame when success is FALSE
Otherwise, the frame is leaked.
src/grd-rdp-pipewire-stream.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/grd-rdp-pipewire-stream.c b/src/grd-rdp-pipewire-stream.c
index fd53d40a..bec4f771 100644
--- a/src/grd-rdp-pipewire-stream.c
+++ b/src/grd-rdp-pipewire-stream.c
@@ -673,13 +673,15 @@ on_frame_ready (GrdRdpPipeWireStream *stream,
grd_rdp_frame_unref (pending_frame);
}
- stream->pending_frame = frame;
+ stream->pending_frame = g_steal_pointer (&frame);
g_mutex_unlock (&stream->frame_mutex);
out:
pw_stream_queue_buffer (stream->pipewire_stream, buffer);
g_source_set_ready_time (stream->render_source, 0);
+
+ g_clear_pointer (&frame, grd_rdp_frame_unref);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]