1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-12 13:17:58 +03:00

network: fix call virNetworkEventLifecycleNew when networkStartNetwork fail

When start a network fail, libvirt still call virNetworkEventLifecycleNew
to send a event.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
Luyao Huang 2014-11-01 18:03:23 +08:00 committed by Martin Kletzander
parent 877a222449
commit 45d9ea5cdd

View File

@ -3253,7 +3253,8 @@ static int networkCreate(virNetworkPtr net)
if (virNetworkCreateEnsureACL(net->conn, network->def) < 0)
goto cleanup;
ret = networkStartNetwork(driver, network);
if ((ret = networkStartNetwork(driver, network)) < 0)
goto cleanup;
event = virNetworkEventLifecycleNew(network->def->name,
network->def->uuid,