diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 38cac07913..603a4ad652 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -28785,9 +28785,9 @@ virDomainDefCompatibleDevice(virDomainDefPtr def, if (action == VIR_DOMAIN_DEVICE_ACTION_UPDATE && live && - ((!!data.newInfo != !!data.oldInfo) || - (data.newInfo && data.oldInfo && - STRNEQ_NULLABLE(data.newInfo->alias, data.oldInfo->alias)))) { + (data.newInfo && data.oldInfo && + data.newInfo->alias && data.oldInfo->alias && + STRNEQ(data.newInfo->alias, data.oldInfo->alias))) { virReportError(VIR_ERR_OPERATION_DENIED, "%s", _("changing device alias is not allowed")); return -1;