mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 16:15:19 +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" (cherry picked from commit 500d77f1811c371598ab7a5fcc90bad45b52bafd)
This commit is contained in:
parent
193b057352
commit
2213707b6b
@ -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…
x
Reference in New Issue
Block a user