mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 16:45:26 +00:00
parallels: don't give null pointers to virBitmapEqual
Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
(cherry picked from commit adae5cf733
)
This commit is contained in:
parent
3c860c40e3
commit
e81632740f
@ -1445,7 +1445,9 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!virBitmapEqual(old->cpumask, new->cpumask)) {
|
if ((old->cpumask != NULL || new->cpumask != NULL) &&
|
||||||
|
(old->cpumask == NULL || new->cpumask == NULL ||
|
||||||
|
!virBitmapEqual(old->cpumask, new->cpumask))) {
|
||||||
|
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||||
_("changing cpu mask is not supported "
|
_("changing cpu mask is not supported "
|
||||||
@ -1465,7 +1467,9 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
|
|||||||
|
|
||||||
if (old->numatune.memory.mode != new->numatune.memory.mode ||
|
if (old->numatune.memory.mode != new->numatune.memory.mode ||
|
||||||
old->numatune.memory.placement_mode != new->numatune.memory.placement_mode ||
|
old->numatune.memory.placement_mode != new->numatune.memory.placement_mode ||
|
||||||
!virBitmapEqual(old->numatune.memory.nodemask, new->numatune.memory.nodemask)) {
|
((old->numatune.memory.nodemask != NULL || new->numatune.memory.nodemask != NULL) &&
|
||||||
|
(old->numatune.memory.nodemask == NULL || new->numatune.memory.nodemask == NULL ||
|
||||||
|
!virBitmapEqual(old->numatune.memory.nodemask, new->numatune.memory.nodemask)))){
|
||||||
|
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||||
_("numa parameters are not supported "
|
_("numa parameters are not supported "
|
||||||
|
Loading…
Reference in New Issue
Block a user