]> git.proxmox.com Git - mirror_qemu.git/blobdiff - migration/rdma.c
sockets: Prepare inet_parse() for flattened SocketAddress
[mirror_qemu.git] / migration / rdma.c
index fe0a4b5a83cbf98b32b215ae1386fd7e00ccc32c..7eaaf96479d811e5c85cdb3f111cad3e5c8ed94f 100644 (file)
@@ -2506,8 +2506,8 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
         rdma->current_index = -1;
         rdma->current_chunk = -1;
 
-        addr = inet_parse(host_port, NULL);
-        if (addr != NULL) {
+        addr = g_new(InetSocketAddress, 1);
+        if (!inet_parse(addr, host_port, NULL)) {
             rdma->port = atoi(addr->port);
             rdma->host = g_strdup(addr->host);
         } else {