From: John Ferlan Date: Fri, 22 Aug 2014 15:06:49 +0000 (-0400) Subject: xenconfig: Resolve Coverity RESOURCE_LEAK X-Git-Tag: v1.2.8-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c585334bdd97f516dfe362373ff62b5a492cb5e2;p=thirdparty%2Flibvirt.git xenconfig: Resolve Coverity RESOURCE_LEAK Since '337a13628' - Coverity complains that 'net' is VIR_ALLOC()'d, but on various 'cleanup' exit paths from the code there is no corresponding cleanup. --- diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 398e9ec4c3..2f53c633af 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -960,6 +960,7 @@ xenParseVif(virConfPtr conf, virDomainDefPtr def) return 0; cleanup: + virDomainNetDefFree(net); VIR_FREE(script); return -1; }