The function doesn't use XPath at all. Don't pass the context to it. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/domain_conf.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 39ddfb7db0..ad2b44b610 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7743,13 +7743,8 @@ virDomainDiskDefGeometryParse(virDomainDiskDef *def, static int virDomainDiskDefDriverParseXML(virDomainDiskDef *def, - xmlNodePtr cur, - xmlXPathContextPtr ctxt) + xmlNodePtr cur) { - VIR_XPATH_NODE_AUTORESTORE(ctxt) - - ctxt->node = cur; - def->driverName = virXMLPropString(cur, "name"); if (virXMLPropEnum(cur, "cache", virDomainDiskCacheTypeFromString, @@ -8037,7 +8032,7 @@ virDomainDiskDefParseXML(virDomainXMLOption *xmlopt, if (virDomainVirtioOptionsParseXML(driverNode, &def->virtio) < 0) return NULL; - if (virDomainDiskDefDriverParseXML(def, driverNode, ctxt) < 0) + if (virDomainDiskDefDriverParseXML(def, driverNode) < 0) return NULL; if (virDomainDiskDefDriverSourceParseXML(def->src, driverNode, ctxt) < 0) -- 2.39.2