Bump github.com/mdlayher/netlink to clean up on bind failure

This commit is contained in:
Matt Layher 2017-03-02 10:50:14 -05:00
commit 17a6ed5355
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
2 changed files with 6 additions and 3 deletions

View file

@ -62,6 +62,9 @@ func bind(s socket, config *Config) (*conn, error) {
}
if err := s.Bind(addr); err != nil {
// Since this never returns conn (and as such, the caller cannot close it),
// close the socket here in the event of a failure to bind.
_ = s.Close()
return nil, err
}