mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-24 18:21:00 +00:00
cmd/tsconnect: fix null pointer dereference when DNS lookups fail
If we never had a chance to open the SSH session we should not try to close it. Fixes #6089 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
e2519813b1
commit
2be951a582
@ -463,6 +463,10 @@ func (s *jsSSHSession) Run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *jsSSHSession) Close() error {
|
func (s *jsSSHSession) Close() error {
|
||||||
|
if s.session == nil {
|
||||||
|
// We never had a chance to open the session, ignore the close request.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return s.session.Close()
|
return s.session.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user