mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
migration/rdma: Fix rdma_addrinfo res leaks
rdma_freeaddrinfo() is the reverse operation of rdma_getaddrinfo() Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20210525080552.28259-2-lizhijian@cn.fujitsu.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
4e812d2338
commit
f53b450ada
1 changed files with 3 additions and 0 deletions
|
@ -987,10 +987,12 @@ static int qemu_rdma_resolve_host(RDMAContext *rdma, Error **errp)
|
|||
}
|
||||
}
|
||||
|
||||
rdma_freeaddrinfo(res);
|
||||
ERROR(errp, "could not resolve address %s", rdma->host);
|
||||
goto err_resolve_get_addr;
|
||||
|
||||
route:
|
||||
rdma_freeaddrinfo(res);
|
||||
qemu_rdma_dump_gid("source_resolve_addr", rdma->cm_id);
|
||||
|
||||
ret = rdma_get_cm_event(rdma->channel, &cm_event);
|
||||
|
@ -2593,6 +2595,7 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
|
|||
break;
|
||||
}
|
||||
|
||||
rdma_freeaddrinfo(res);
|
||||
if (!e) {
|
||||
ERROR(errp, "Error: could not rdma_bind_addr!");
|
||||
goto err_dest_init_bind_addr;
|
||||
|
|
Loading…
Reference in a new issue