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

Make sure to close nshandle in ipvs.New

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
Jana Radhakrishnan 2016-06-13 15:09:02 -07:00
parent 16b7b6f700
commit d2cc81c023

View file

@ -59,10 +59,10 @@ func New(path string) (*Handle, error) {
return nil, err
}
}
defer n.Close()
sock, err := nl.GetNetlinkSocketAt(n, netns.None(), syscall.NETLINK_GENERIC)
if err != nil {
n.Close()
return nil, err
}