firewall: remove unused netns check from DEL method
Signed-off-by: Erik Sipsma <sipsma@amazon.com>
This commit is contained in:
parent
fc7059c1ae
commit
0a1421a08c
@ -27,7 +27,6 @@ import (
|
|||||||
"github.com/containernetworking/cni/pkg/types/current"
|
"github.com/containernetworking/cni/pkg/types/current"
|
||||||
"github.com/containernetworking/cni/pkg/version"
|
"github.com/containernetworking/cni/pkg/version"
|
||||||
|
|
||||||
"github.com/containernetworking/plugins/pkg/ns"
|
|
||||||
bv "github.com/containernetworking/plugins/pkg/utils/buildversion"
|
bv "github.com/containernetworking/plugins/pkg/utils/buildversion"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -147,12 +146,6 @@ func cmdDel(args *skel.CmdArgs) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tolerate errors if the container namespace has been torn down already
|
|
||||||
containerNS, err := ns.GetNS(args.Netns)
|
|
||||||
if err == nil {
|
|
||||||
defer containerNS.Close()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Runtime errors are ignored
|
// Runtime errors are ignored
|
||||||
if err := backend.Del(conf, result); err != nil {
|
if err := backend.Del(conf, result); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user