From 6d25ed4895f5b16ff46c126b3d9f96436abc6366 Mon Sep 17 00:00:00 2001 From: Luyao Huang Date: Sat, 1 Nov 2014 18:03:23 +0800 Subject: [PATCH] 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 (cherry picked from commit 45d9ea5cddad5ed151db15362a881b730b8c88f1) --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 979fb13247..b69c40e99a 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -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, -- GitLab