diff options
Diffstat (limited to 'migration/rdma.c')
-rw-r--r-- | migration/rdma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/rdma.c b/migration/rdma.c index fe0a4b5a83..7eaaf96479 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -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 { |