]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
xenconfig: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Fri, 22 Aug 2014 15:06:49 +0000 (11:06 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 22 Aug 2014 17:02:48 +0000 (13:02 -0400)
Since '337a13628' - Coverity complains that 'net' is VIR_ALLOC()'d, but
on various 'cleanup' exit paths from the code there is no corresponding
cleanup.

src/xenconfig/xen_common.c

index 398e9ec4c32c8bfe5f2d79ca6148540a0c936809..2f53c633af9d715afa1f09c6fdd5e879a4a3cba7 100644 (file)
@@ -960,6 +960,7 @@ xenParseVif(virConfPtr conf, virDomainDefPtr def)
     return 0;
 
  cleanup:
+    virDomainNetDefFree(net);
     VIR_FREE(script);
     return -1;
 }