mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
channel: Fix leak in red_channel_remove_client
It was using g_list_remove_link() to remove an element from the RedChannel::clients list while it really meant to be using g_list_delete_link() which frees the memory associated with the link. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
328a4a9b28
commit
f49f04f2be
@ -477,7 +477,7 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc)
|
||||
link = g_list_find(channel->priv->clients, rcc);
|
||||
spice_return_if_fail(link != NULL);
|
||||
|
||||
channel->priv->clients = g_list_remove_link(channel->priv->clients, link);
|
||||
channel->priv->clients = g_list_delete_link(channel->priv->clients, link);
|
||||
// TODO: should we set rcc->channel to NULL???
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user