diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 43725155c2f4d2f4bc5e7838e6d24de265256643..ae7c0d9b71ab2332d32b8516f3aaca178fc0fee7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5573,7 +5573,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDefPtr def, struct virDomainDefValidateAliasesData *data = opaque; const char *alias = info->alias; - if (!alias || !virDomainDeviceAliasIsUserAlias(alias)) + if (!virDomainDeviceAliasIsUserAlias(alias)) return 0; /* Some crazy backcompat for consoles. */ @@ -6702,7 +6702,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address, bool virDomainDeviceAliasIsUserAlias(const char *aliasStr) { - return STRPREFIX(aliasStr, USER_ALIAS_PREFIX); + return aliasStr && STRPREFIX(aliasStr, USER_ALIAS_PREFIX); }