From d399a728f45356ae257227d555656f4ef8790362 Mon Sep 17 00:00:00 2001 From: Zhenzhong Duan Date: Thu, 22 Jul 2021 15:44:18 +0800 Subject: [PATCH] conf: Restore ctxt's node in right scope We just found is ignored in our xml. Further debug shows that ctxt's node pointer isn't restored in virDomainSecDefParseXML(), which leads to parsing of remaining elements failed. Signed-off-by: Zhenzhong Duan Reviewed-by: Pavel Hrdina --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e05ea9ba88..13b7741eb8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14772,6 +14772,7 @@ static virDomainSecDef * virDomainSecDefParseXML(xmlNodePtr lsecNode, xmlXPathContextPtr ctxt) { + VIR_XPATH_NODE_AUTORESTORE(ctxt) g_autoptr(virDomainSecDef) sec = g_new0(virDomainSecDef, 1); ctxt->node = lsecNode;