[Spice-commits] server/reds.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Feb 29 09:19:09 UTC 2020
server/reds.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit f338b5bec952b0eca8ef9a027292dc8a01735a83
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Dec 6 16:26:55 2019 +0000
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 at redhat.com>
diff --git a/server/reds.c b/server/reds.c
index ee8cf387..9fbcd8fa 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -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);
}
More information about the Spice-commits
mailing list