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);
|
xen_vm_set_free(result);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (record->is_a_template == 0)
|
if (record) {
|
||||||
DomNum++;
|
if (record->is_a_template == 0)
|
||||||
xen_vm_record_free(record);
|
DomNum++;
|
||||||
|
xen_vm_record_free(record);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xen_vm_set_free(result);
|
xen_vm_set_free(result);
|
||||||
return DomNum;
|
return DomNum;
|
||||||
|
Loading…
Reference in New Issue
Block a user