From: Richard W.M. Jones Date: Thu, 25 Nov 2010 15:36:57 +0000 (+0000) Subject: Fix memory leak (xptype XPath obj) in add-domain API. X-Git-Tag: 1.7.14~4 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=dfa9d6cf32b23e34eeba916a9a263483990a3fce;p=libguestfs.git Fix memory leak (xptype XPath obj) in add-domain API. --- 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;