diff options
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/migration/migration.c b/migration/migration.c index ccf969a62e..3f4191a9c7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -406,12 +406,9 @@ int migration_incoming_enable_colo(void) void migrate_add_address(SocketAddress *address) { MigrationIncomingState *mis = migration_incoming_get_current(); - SocketAddressList *addrs; - addrs = g_new0(SocketAddressList, 1); - addrs->next = mis->socket_address_list; - mis->socket_address_list = addrs; - addrs->value = QAPI_CLONE(SocketAddress, address); + QAPI_LIST_PREPEND(mis->socket_address_list, + QAPI_CLONE(SocketAddress, address)); } static void qemu_start_incoming_migration(const char *uri, Error **errp) |