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>
This commit is contained in:
hzue 2018-07-01 11:56:50 +08:00
parent abc4c5c5d8
commit 5ef4c59574

View file

@ -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()