Don't log nil errors in CNI DEL

This commit is contained in:
Bryan Boreham committed 2017-10-17 16:13:48 +00:00
1 parent 4a1a1e83c8
commit 62dbe03193
1 file changed
+3 -1
+3 -1
View File
@@ -207,7 +207,9 @@ func (c *CNIPlugin) CmdDel(args *skel.CmdArgs) error {
} else {
err = ipam.ExecDel(conf.IPAM.Type, args.StdinData)
}
logOnStderr(fmt.Errorf("unable to release IP address: %s", err))
if err != nil {
logOnStderr(fmt.Errorf("unable to release IP address: %s", err))
}
return nil
}