diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d95dd3ebd54d8361524b492749cdfde81a3f3592..9b7ae3f2ae7f246a7acb3397dae93f239cb0bffe 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9614,12 +9614,16 @@ virDomainGraphicsDefParseXML(xmlNodePtr node, break; } } - if (!matched) { + if (found && !matched) { virReportError(VIR_ERR_XML_ERROR, _("graphics listen attribute %s must match address " "attribute of first listen element (found %s)"), - listenAddr, found ? found : "none"); + listenAddr, found); goto error; + } else if (!found) { + /* quietly ignore listen address if none of the listens + * are of type address */ + VIR_FREE(listenAddr); } } }