aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-12-01 07:27:58 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2023-12-01 07:27:58 -0500
commite8c0753b631deb78ff39770e88a4fd1289b38a39 (patch)
tree8751c634f9a69eeb7581c0796b100343aa3117fb
parentabf635ddfe3242df907f58967f3c1e6763bbca2d (diff)
parent41581265aa83127036e4f2d6417820f59276514b (diff)
Merge tag 'migration-20231130-pull-request' of https://gitlab.com/juan.quintela/qemu into staging
Migration Pull request (20231130) Hi In this pull request: - fix form p-ioc set too soon - free 'saddr' at the right time Please, apply. CI: https://gitlab.com/juan.quintela/qemu/-/pipelines/1090495323 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmVoZrgACgkQ9IfvGFhy # 1yOS6BAA2Rag1bz2yrI/Gts+J/+pVu3a8AZh0lu8J5nABkFSGwrQ5RfVuSuq1Cwt # j9uctmt9qAEbbLeFsTf/CYCxO4R1RDhOw78o7YfPZPiUFOAvuZB+gHCGA+NH1YH7 # a8uzh/yQ0wSQSKrkFHKV7A1Kli7k6c8iYo3v9ibJDqphUpOfjSPLB22hmRqRp/gy # 2ZQH/mxj9xlkYxQ/WUKVVl3weXbshbniuQ3RM3HnZYzzWlam4PjI+rAyAF6jhmf6 # ReKDm4n55jTNZXXd9Wa5PZQ7g55BwO1suJfGeojJGsdgfqsFXf/TTwRdmvxOMg/V # 5X/Eo8GxMF2Vf3pul/m3eNmKvlP0Bh+VlN8dF+Ii8ZXawOEsJpXcCE2yNpXn4UqP # nyaTznnel2QCDMNWaQNHVbGXFc+n5ocwEnDmO5Idwp5W3/+MFM+xP05FpnshpR0h # 1vq5dUO/mq5jIoYK//iIXe99rHoIJlOP6SRdtTyxRBhJLg76YKRYmF3RaU51B9n4 # qWLWhDQBwbdv0ZEPZIAhDlO5grY9BRQT5aGNLRsLWL0rY4nJtYdVv8/MyISlNCD8 # eY8SOB0cs/vaLG7Nfj0tboXMAh5sPCXxqx25pVf+x+09EJhD1VZ+axTjbnJmRTs/ # nL5tmQ2EPvFzoVzxeOHdEK+jXdJYWBZf6LBlPY1HN+Gt3JjIecE= # =5Img # -----END PGP SIGNATURE----- # gpg: Signature made Thu 30 Nov 2023 05:40:56 EST # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * tag 'migration-20231130-pull-request' of https://gitlab.com/juan.quintela/qemu: migration: free 'saddr' since be no longer used migration/multifd: Stop setting p->ioc before connecting Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--migration/migration.c5
-rw-r--r--migration/multifd.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 28a34c9068..1832dad618 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -462,7 +462,6 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel,
{
g_autoptr(MigrationChannel) val = g_new0(MigrationChannel, 1);
g_autoptr(MigrationAddress) addr = g_new0(MigrationAddress, 1);
- SocketAddress *saddr = NULL;
InetSocketAddress *isock = &addr->u.rdma;
strList **tail = &addr->u.exec.args;
@@ -487,12 +486,14 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel,
strstart(uri, "vsock:", NULL) ||
strstart(uri, "fd:", NULL)) {
addr->transport = MIGRATION_ADDRESS_TYPE_SOCKET;
- saddr = socket_parse(uri, errp);
+ SocketAddress *saddr = socket_parse(uri, errp);
if (!saddr) {
return false;
}
addr->u.socket.type = saddr->type;
addr->u.socket.u = saddr->u;
+ /* Don't free the objects inside; their ownership moved to "addr" */
+ g_free(saddr);
} else if (strstart(uri, "file:", NULL)) {
addr->transport = MIGRATION_ADDRESS_TYPE_FILE;
addr->u.file.filename = g_strdup(uri + strlen("file:"));
diff --git a/migration/multifd.c b/migration/multifd.c
index ec58c58082..409460684f 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -883,8 +883,7 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
trace_multifd_new_send_channel_async(p->id);
if (!qio_task_propagate_error(task, &local_err)) {
- p->c = ioc;
- qio_channel_set_delay(p->c, false);
+ qio_channel_set_delay(ioc, false);
p->running = true;
if (multifd_channel_connect(p, ioc, &local_err)) {
return;