From 6c7c60178168f5c3f964332ff17aa90e070215d5 Mon Sep 17 00:00:00 2001 From: hzue Date: Sun, 1 Jul 2018 11:56:50 +0800 Subject: [PATCH] Fix error handling about bridgeSetup Fix the error from bridgeSetup doesn't handle by the defer function in the createNetwork function. Signed-off-by: Terry Chu --- drivers/bridge/bridge.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bridge/bridge.go b/drivers/bridge/bridge.go index 581aa008ad..ea21a1aa76 100644 --- a/drivers/bridge/bridge.go +++ b/drivers/bridge/bridge.go @@ -614,9 +614,7 @@ func (d *driver) checkConflict(config *networkConfiguration) error { return nil } -func (d *driver) createNetwork(config *networkConfiguration) error { - var err error - +func (d *driver) createNetwork(config *networkConfiguration) (err error) { defer osl.InitOSContext()() networkList := d.getNetworks()