]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
lxc: Resolve Coverity RESOURCE_LEAK
authorJohn Ferlan <jferlan@redhat.com>
Thu, 27 Aug 2015 10:59:38 +0000 (06:59 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 27 Aug 2015 11:10:20 +0000 (07:10 -0400)
Commit id 'c27553b6e' added a return -1 in a failure path without
the necessary VIR_FREE(stack)

src/lxc/lxc_container.c

index feb8fad73e6cbe7374b06be4404b79147d4402b9..125e1c80687830c91e761eb02a049c096d7e476d 100644 (file)
@@ -2463,6 +2463,7 @@ int lxcContainerStart(virDomainDefPtr def,
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                            _("Config askes for inherit net namespace "
                              "as well as private network interfaces"));
+            VIR_FREE(stack);
             return -1;
         }
         VIR_DEBUG("Inheriting a net namespace");