From: Zhenzhong Duan Date: Thu, 22 Jul 2021 07:44:18 +0000 (+0800) Subject: conf: Restore ctxt's node in right scope X-Git-Tag: v7.6.0-rc1~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d399a728f45356ae257227d555656f4ef8790362;p=thirdparty%2Flibvirt.git 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 --- 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;