Merge pull request #488 from mdlayher/vendor-netlink
Bump github.com/mdlayher/netlink to clean up on bind failure
This commit is contained in:
commit
6aa9afc8df
2 changed files with 6 additions and 3 deletions
3
vendor/github.com/mdlayher/netlink/conn_linux.go
generated
vendored
3
vendor/github.com/mdlayher/netlink/conn_linux.go
generated
vendored
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue