]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virNodeDevCapScsiHostParseXML: avoid an unconditional leak
authorJim Meyering <meyering@redhat.com>
Mon, 15 Feb 2010 18:54:45 +0000 (19:54 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 16 Feb 2010 16:49:05 +0000 (17:49 +0100)
* src/conf/node_device_conf.c (virNodeDevCapScsiHostParseXML):
Free the "nodes" buffer allocated by virXPathNodeSet.

src/conf/node_device_conf.c

index 4b65953c8fc0f0931959c4722075115ed3a3d5a1..09c0f41672a3843c1a3b5c8e81dbb0d2e1c97940 100644 (file)
@@ -797,6 +797,7 @@ virNodeDevCapScsiHostParseXML(xmlXPathContextPtr ctxt,
 out:
     VIR_FREE(type);
     ctxt->node = orignode;
+    VIR_FREE(nodes);
     return ret;
 }