Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 91dc00edad..0e9106b061 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8275,7 +8275,6 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
{
int tlsCfgVal;
g_autofree char *protocol = NULL;
- g_autofree char *haveTLS = NULL;
g_autofree char *tlsCfg = NULL;
g_autofree char *sslverifystr = NULL;
xmlNodePtr tmpnode;
@@ -8299,12 +8298,8 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
return -1;
}
- if ((haveTLS = virXMLPropString(node, "tls")) &&
- (src->haveTLS = virTristateBoolTypeFromString(haveTLS)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown disk source 'tls' setting '%s'"),
haveTLS);
- return -1;
- }
+ if (virXMLPropTristateBool(node, "tls", false, &src->haveTLS) <
0)
+ return -1;
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
(tlsCfg = virXMLPropString(node, "tlsFromConfig"))) {
--
2.26.2