conf: Propagate xmlXPathContextPtr into virDomainLeaseDefParseXML()

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Kristina Hanicova 2021-05-04 13:40:01 +02:00 committed by Michal Privoznik
parent bd8f53bcab
commit 997b920433

View File

@ -8041,7 +8041,8 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDef ***seclabels_rtn,
/* Parse the XML definition for a lease /* Parse the XML definition for a lease
*/ */
static virDomainLeaseDef * static virDomainLeaseDef *
virDomainLeaseDefParseXML(xmlNodePtr node) virDomainLeaseDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt G_GNUC_UNUSED)
{ {
virDomainLeaseDef *def; virDomainLeaseDef *def;
xmlNodePtr cur; xmlNodePtr cur;
@ -15465,7 +15466,7 @@ virDomainDeviceDefParse(const char *xmlStr,
return NULL; return NULL;
break; break;
case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_LEASE:
if (!(dev->data.lease = virDomainLeaseDefParseXML(node))) if (!(dev->data.lease = virDomainLeaseDefParseXML(node, ctxt)))
return NULL; return NULL;
break; break;
case VIR_DOMAIN_DEVICE_FS: case VIR_DOMAIN_DEVICE_FS:
@ -20233,7 +20234,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (n) if (n)
def->leases = g_new0(virDomainLeaseDef *, n); def->leases = g_new0(virDomainLeaseDef *, n);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
virDomainLeaseDef *lease = virDomainLeaseDefParseXML(nodes[i]); virDomainLeaseDef *lease = virDomainLeaseDefParseXML(nodes[i], ctxt);
if (!lease) if (!lease)
goto error; goto error;