conf: Restore ctxt's node in right scope

We just found <qemu:commandline> 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 <zhenzhong.duan@intel.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Zhenzhong Duan 2021-07-22 15:44:18 +08:00 committed by Pavel Hrdina
parent bcad39457d
commit d399a728f4

View File

@ -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;