mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 22:10:46 +00:00
red-client: Make sure MainChannelClient is freed as last
MainChannelClient is used by other clients to store some data so should not disappear if other clients are still present. Keep a owning reference to it and release after RedClient is released. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
2e1684eb66
commit
59be4f19c4
@ -106,6 +106,7 @@ red_client_finalize (GObject *object)
|
||||
{
|
||||
RedClient *self = RED_CLIENT(object);
|
||||
|
||||
g_clear_object(&self->mcc);
|
||||
spice_debug("release client=%p", self);
|
||||
pthread_mutex_destroy(&self->lock);
|
||||
|
||||
@ -313,7 +314,8 @@ MainChannelClient *red_client_get_main(RedClient *client)
|
||||
|
||||
void red_client_set_main(RedClient *client, MainChannelClient *mcc)
|
||||
{
|
||||
client->mcc = mcc;
|
||||
spice_assert(client->mcc == NULL);
|
||||
client->mcc = g_object_ref(mcc);
|
||||
}
|
||||
|
||||
void red_client_semi_seamless_migrate_complete(RedClient *client)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user