mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-05 18:56:51 -05:00
xenapi: Resolve Coverity REVERSE_INULL
Coverity notes in xenapiDomainGetXMLDesc that 'vms' is dereferenced a few times before a "if (vms) xen_vm_set_free(vms);" call is made. Since we'd exit out much sooner if the fetch of the vms failed, just remove the unnecessary "if (vms)" check.
This commit is contained in:
@@ -1563,8 +1563,7 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
|
||||
}
|
||||
xen_vif_set_free(vif_set);
|
||||
}
|
||||
if (vms)
|
||||
xen_vm_set_free(vms);
|
||||
xen_vm_set_free(vms);
|
||||
xml = virDomainDefFormat(defPtr, flags);
|
||||
virDomainDefFree(defPtr);
|
||||
return xml;
|
||||
|
||||
Reference in New Issue
Block a user