aboutsummaryrefslogtreecommitdiff
path: root/migration/multifd.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2024-02-22 17:53:00 +0800
committerPeter Xu <peterx@redhat.com>2024-02-28 11:31:28 +0800
commit72b90b96872acc5d00f9c16dfc196543349361da (patch)
tree00e7e16319bb768a3adc5b61bcaf6ff41363434c /migration/multifd.c
parent770de49c00fa9eb262473f282c92979b47b7fd22 (diff)
migration/multifd: Cleanup outgoing_args in state destroy
outgoing_args is a global cache of socket address to be reused in multifd. Freeing the cache in per-channel destructor is more or less a hack. Move it to multifd_send_cleanup_state() so it only get checked once. Use a small helper to do so because it's internal of socket.c. Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240222095301.171137-5-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/multifd.c')
-rw-r--r--migration/multifd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/multifd.c b/migration/multifd.c
index af89e05915..fa33fd98b4 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -689,6 +689,7 @@ static bool multifd_send_cleanup_channel(MultiFDSendParams *p, Error **errp)
static void multifd_send_cleanup_state(void)
{
+ socket_cleanup_outgoing_migration();
qemu_sem_destroy(&multifd_send_state->channels_created);
qemu_sem_destroy(&multifd_send_state->channels_ready);
g_free(multifd_send_state->params);