mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-06 03:39:29 +00:00
Fix leak of virNetworkPtr in LXC startup failure path
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)
This commit is contained in:
parent
e69aaf2f7e
commit
3926d8571b
@ -468,7 +468,6 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
|
|||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Network '%s' is not active."),
|
_("Network '%s' is not active."),
|
||||||
def->nets[i]->data.network.name);
|
def->nets[i]->data.network.name);
|
||||||
goto cleanup;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fail) {
|
if (!fail) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user