vbox_tmpl.c: avoid an unconditional leak

* src/vbox/vbox_tmpl.c (vboxDomainDumpXML): Free def.
Improved by Matthias Bolte.
This commit is contained in:
Jim Meyering 2010-02-15 17:54:15 +01:00
parent 55e642e586
commit 4a3d1ca3f1

View 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;
}