1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +00:00

remoteDomainGetIOThreadInfo: remove unreachable cleanup code

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-11-16 17:15:51 +01:00
parent 82bda55e2f
commit 5ca76b9fbf

View File

@ -2248,7 +2248,6 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom,
remote_domain_get_iothread_info_args args; remote_domain_get_iothread_info_args args;
remote_domain_get_iothread_info_ret ret; remote_domain_get_iothread_info_ret ret;
remote_domain_iothread_info *src; remote_domain_iothread_info *src;
virDomainIOThreadInfoPtr *info_ret = NULL;
remoteDriverLock(priv); remoteDriverLock(priv);
@ -2273,6 +2272,8 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom,
} }
if (info) { if (info) {
virDomainIOThreadInfoPtr *info_ret = NULL;
if (!ret.info.info_len) { if (!ret.info.info_len) {
*info = NULL; *info = NULL;
rv = ret.ret; rv = ret.ret;
@ -2293,17 +2294,11 @@ remoteDomainGetIOThreadInfo(virDomainPtr dom,
info_ret[i]->cpumaplen = src->cpumap.cpumap_len; info_ret[i]->cpumaplen = src->cpumap.cpumap_len;
} }
*info = info_ret; *info = info_ret;
info_ret = NULL;
} }
rv = ret.ret; rv = ret.ret;
cleanup: cleanup:
if (info_ret) {
for (i = 0; i < ret.info.info_len; i++)
virDomainIOThreadInfoFree(info_ret[i]);
VIR_FREE(info_ret);
}
xdr_free((xdrproc_t)xdr_remote_domain_get_iothread_info_ret, xdr_free((xdrproc_t)xdr_remote_domain_get_iothread_info_ret,
(char *) &ret); (char *) &ret);