From 82f5fdb0dbbc0c7b04861edeadf70c86c9342df2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Jan 2011 17:11:40 +0000 Subject: [PATCH] lib: Fix use-after-free bug in XPath parsing code. --- src/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virt.c b/src/virt.c index 2c6be3c..9f84908 100644 --- a/src/virt.c +++ b/src/virt.c @@ -196,8 +196,8 @@ guestfs___for_each_disk (guestfs_h *g, 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); + xmlXPathFreeObject (xptype); xmlXPathObjectPtr xpfilename; -- 1.8.3.1