Avoid leaking this channel.
Signed-off-by: Frediano Ziglio <[email protected]>
---
server/reds.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/server/reds.c b/server/reds.c
index 479a815..17e5ada 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3592,6 +3592,10 @@ SPICE_GNUC_VISIBLE void spice_server_destroy(SpiceServer
*reds)
servers = g_list_remove(servers, reds);
pthread_mutex_unlock(&global_reds_lock);
+ if (reds->inputs_channel) {
+ reds_unregister_channel(reds, RED_CHANNEL(reds->inputs_channel));
+ red_channel_destroy(RED_CHANNEL(reds->inputs_channel));
+ }
if (reds->main_channel) {
red_channel_destroy(RED_CHANNEL(reds->main_channel));
}
--
git-series 0.9.1
_______________________________________________
Spice-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel