]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox_tmpl.c: avoid an unconditional leak
authorJim Meyering <meyering@redhat.com>
Mon, 15 Feb 2010 16:54:15 +0000 (17:54 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 16 Feb 2010 16:49:05 +0000 (17:49 +0100)
* src/vbox/vbox_tmpl.c (vboxDomainDumpXML): Free def.
Improved by Matthias Bolte.

src/vbox/vbox_tmpl.c

index 68dffd2bd75269eba96546189e692b747734c624..d1a701e6184fc4a3b24cc7f4780f7d5de04971ec 100644 (file)
@@ -6183,6 +6183,7 @@ static char *vboxNetworkDumpXML(virNetworkPtr network, int flags ATTRIBUTE_UNUSE
     ret = virNetworkDefFormat(def);
 
 cleanup:
+    virNetworkDefFree(def);
     VIR_FREE(networkNameUtf8);
     return ret;
 }