mirror of https://github.com/xemu-project/xemu.git
migration/rdma: Drop dead qemu_rdma_data_init() code for !@host_port
qemu_rdma_data_init() neglects to set an Error when it fails because @host_port is null. Fortunately, no caller passes null, so this is merely a latent bug. Drop the flawed code handling null argument. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230928132019.2544702-23-armbru@redhat.com>
This commit is contained in:
parent
f35c0d9b07
commit
d63f4016b1
|
@ -2767,7 +2767,6 @@ static RDMAContext *qemu_rdma_data_init(const char *host_port, Error **errp)
|
|||
RDMAContext *rdma = NULL;
|
||||
InetSocketAddress *addr;
|
||||
|
||||
if (host_port) {
|
||||
rdma = g_new0(RDMAContext, 1);
|
||||
rdma->current_index = -1;
|
||||
rdma->current_chunk = -1;
|
||||
|
@ -2784,8 +2783,6 @@ static RDMAContext *qemu_rdma_data_init(const char *host_port, Error **errp)
|
|||
}
|
||||
|
||||
qapi_free_InetSocketAddress(addr);
|
||||
}
|
||||
|
||||
return rdma;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue