mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Have resources initialized before deleting overlay network
- Otherwise a overlay network delete after daemon restart will hit a nil pointer dereference while releasing the vxlan id Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
d0cfd9b3dd
commit
0e7a19521c
1 changed files with 5 additions and 0 deletions
|
@ -104,6 +104,11 @@ func (d *driver) DeleteNetwork(nid string) error {
|
||||||
return fmt.Errorf("invalid network id")
|
return fmt.Errorf("invalid network id")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure driver resources are initialized before proceeding
|
||||||
|
if err := d.configure(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
n := d.network(nid)
|
n := d.network(nid)
|
||||||
if n == nil {
|
if n == nil {
|
||||||
return fmt.Errorf("could not find network with id %s", nid)
|
return fmt.Errorf("could not find network with id %s", nid)
|
||||||
|
|
Loading…
Reference in a new issue