]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix leak of virNetworkPtr in LXC startup failure path
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Nov 2012 12:57:57 +0000 (12:57 +0000)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:53:40 +0000 (16:53 -0500)
When starting an LXC guest with a virNetwork based NIC device,
if the network was not active, the virNetworkPtr device would
be leaked

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 509ce9437ff77db84b5b035ad6b778fa8548a684)

src/lxc/lxc_process.c

index ae0b733afd8162fbf572b806b0b6476e4e13b4b5..1e151a6954f91879a799523f48ed6072fb96acf7 100644 (file)
@@ -468,7 +468,6 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
                     virReportError(VIR_ERR_INTERNAL_ERROR,
                                    _("Network '%s' is not active."),
                                    def->nets[i]->data.network.name);
-                goto cleanup;
             }
 
             if (!fail) {