Skip to content

Commit

Permalink
Merge pull request #2094 from luzhipeng-zte/removelinkdel
Browse files Browse the repository at this point in the history
fix for #1333, calling LinkDel to delete link device when the err is NULL
  • Loading branch information
Flavio Crisciani authored Feb 28, 2018
2 parents a2e6eb2 + b43aa94 commit c2080b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/overlay/ov_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (d *driver) DeleteNetwork(nid string) error {

for _, ep := range n.endpoints {
if ep.ifName != "" {
if link, err := ns.NlHandle().LinkByName(ep.ifName); err != nil {
if link, err := ns.NlHandle().LinkByName(ep.ifName); err == nil {
ns.NlHandle().LinkDel(link)
}
}
Expand Down

0 comments on commit c2080b3

Please sign in to comment.