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 0e9106b061..39b1e237f5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8398,7 +8398,6 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, g_autoptr(virStorageSourceNVMeDef) nvme = NULL; g_autofree char *type = NULL; g_autofree char *namespc = NULL; - g_autofree char *managed = NULL; xmlNodePtr address; nvme = g_new0(virStorageSourceNVMeDef, 1); @@ -8429,14 +8428,8 @@ virDomainDiskSourceNVMeParse(xmlNodePtr node, return -1; } - if ((managed = virXMLPropString(node, "managed"))) { - if ((nvme->managed = virTristateBoolTypeFromString(managed)) <= 0) { - virReportError(VIR_ERR_XML_ERROR, - _("malformed managed value '%s'"), - managed); - return -1; - } - } + if (virXMLPropTristateBool(node, "managed", false, &nvme->managed) < 0) + return -1; if (!(address = virXPathNode("./address", ctxt))) { virReportError(VIR_ERR_XML_ERROR, "%s", -- 2.26.2