mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 09:46:50 +00:00
reds: Reuse reds_link_free to free link message
Instead of freeing manually the field and then detaching from the structure just detach only if retained. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
2e1da8486d
commit
f338b5bec9
@ -2101,13 +2101,12 @@ static void reds_handle_other_links(RedsState *reds, RedLinkInfo *link)
|
||||
if (red_client_during_migrate_at_target(client) && !reds->dst_do_seamless_migrate) {
|
||||
spice_assert(mig_client);
|
||||
reds_mig_target_client_add_pending_link(mig_client, link_mess, link->stream);
|
||||
link->link_mess = NULL;
|
||||
} else {
|
||||
spice_assert(!mig_client);
|
||||
reds_channel_do_link(channel, client, link_mess, link->stream);
|
||||
g_free(link_mess);
|
||||
}
|
||||
link->stream = NULL;
|
||||
link->link_mess = NULL;
|
||||
reds_link_free(link);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user