Browse Source

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 <jubosh.tw@gmail.com>
hzue 7 years ago
parent
commit
5ef4c59574
1 changed files with 1 additions and 3 deletions
  1. 1 3
      libnetwork/drivers/bridge/bridge.go

+ 1 - 3
libnetwork/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()