mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
xenapi: Resolve Coverity FORWARD_NULL
Since inception. Coverity complains that the code checks "(record == NULL && !session->ok)", but doesn't check (record != NULL) before dereferencing at "record->is_a_template"
This commit is contained in:
parent
d9beeb68e4
commit
500d77f181
@ -1646,9 +1646,11 @@ xenapiConnectNumOfDefinedDomains(virConnectPtr conn)
|
||||
xen_vm_set_free(result);
|
||||
return -1;
|
||||
}
|
||||
if (record->is_a_template == 0)
|
||||
DomNum++;
|
||||
xen_vm_record_free(record);
|
||||
if (record) {
|
||||
if (record->is_a_template == 0)
|
||||
DomNum++;
|
||||
xen_vm_record_free(record);
|
||||
}
|
||||
}
|
||||
xen_vm_set_free(result);
|
||||
return DomNum;
|
||||
|
Loading…
Reference in New Issue
Block a user