1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #794 from aboch/ipm

Release address pool before removing the network from store
This commit is contained in:
Madhu Venugopal 2015-12-02 12:57:23 -08:00
commit e0a2bab608

View file

@ -603,12 +603,13 @@ func (n *network) Delete() error {
if err = n.getController().deleteFromStore(n.getEpCnt()); err != nil {
return fmt.Errorf("error deleting network endpoint count from store: %v", err)
}
n.ipamRelease()
if err = n.getController().deleteFromStore(n); err != nil {
return fmt.Errorf("error deleting network from store: %v", err)
}
n.ipamRelease()
return nil
}