From dfa9d6cf32b23e34eeba916a9a263483990a3fce Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 25 Nov 2010 15:36:57 +0000 Subject: [PATCH] Fix memory leak (xptype XPath obj) in add-domain API. --- src/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/virt.c b/src/virt.c index 8911148..ab38c36 100644 --- a/src/virt.c +++ b/src/virt.c @@ -206,6 +206,7 @@ guestfs___add_libvirt_dom (guestfs_h *g, virDomainPtr dom, assert (xptype->nodesetval->nodeTab[0]); assert (xptype->nodesetval->nodeTab[0]->type == XML_ATTRIBUTE_NODE); xmlAttrPtr attr = (xmlAttrPtr) xptype->nodesetval->nodeTab[0]; + xmlXPathFreeObject (xptype); char *type = (char *) xmlNodeListGetString (doc, attr->children, 1); xmlXPathObjectPtr xpfilename; -- 1.8.3.1