remoteDomainGetFSInfo: 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:16:35 +01:00
parent 5ca76b9fbf
commit caaf792eed

View File

@ -7633,7 +7633,6 @@ remoteDomainGetFSInfo(virDomainPtr dom,
remote_domain_get_fsinfo_args args;
remote_domain_get_fsinfo_ret ret;
remote_domain_fsinfo *src;
virDomainFSInfoPtr *info_ret = NULL;
remoteDriverLock(priv);
@ -7656,6 +7655,8 @@ remoteDomainGetFSInfo(virDomainPtr dom,
}
if (info) {
virDomainFSInfoPtr *info_ret = NULL;
if (!ret.info.info_len) {
*info = NULL;
rv = ret.ret;
@ -7685,17 +7686,11 @@ remoteDomainGetFSInfo(virDomainPtr dom,
}
*info = info_ret;
info_ret = NULL;
}
rv = ret.ret;
cleanup:
if (info_ret) {
for (i = 0; i < ret.info.info_len; i++)
virDomainFSInfoFree(info_ret[i]);
VIR_FREE(info_ret);
}
xdr_free((xdrproc_t)xdr_remote_domain_get_fsinfo_ret,
(char *) &ret);