Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/domain_conf.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 329f42d6dd..9822f4f451 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11704,15 +11704,8 @@ virDomainChrSourceDefParseTCP(virDomainChrSourceDefPtr def, def->data.tcp.host = virXMLPropString(source, "host"); def->data.tcp.service = virXMLPropString(source, "service"); - if ((tmp = virXMLPropString(source, "tls"))) { - if ((def->data.tcp.haveTLS = virTristateBoolTypeFromString(tmp)) <= 0) { - virReportError(VIR_ERR_XML_ERROR, - _("unknown chardev 'tls' setting '%s'"), - tmp); - return -1; - } - VIR_FREE(tmp); - } + if (virXMLPropTristateBool(source, "tls", false, &def->data.tcp.haveTLS) < 0) + return -1; if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) && (tmp = virXMLPropString(source, "tlsFromConfig"))) { -- 2.26.2