]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virNWFilterDefParseXML: avoid leak on error paths
authorJim Meyering <meyering@redhat.com>
Tue, 18 May 2010 10:05:53 +0000 (12:05 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 18 May 2010 17:23:32 +0000 (19:23 +0200)
* src/conf/nwfilter_conf.c (virNWFilterDefParseXML): Also free "ret"
via cleanup.

src/conf/nwfilter_conf.c

index ea73a33e0fcc56ef989894ddf9066639bc5da957..fc6d4617bdce986475ac0163f4a99ddc6521fa4d 100644 (file)
@@ -1767,6 +1767,7 @@ virNWFilterDefParseXML(xmlXPathContextPtr ctxt) {
     return ret;
 
  cleanup:
+    virNWFilterDefFree(ret);
     VIR_FREE(chain);
     VIR_FREE(uuid);
     return NULL;