Free inputs_channel in spice_server_destroy

Avoid leaking this channel.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-12-02 17:35:07 +00:00
parent e4a17a4875
commit 8dbfd4971a

View File

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