Skip to content

Commit

Permalink
fix: fix nil pointer dereference when exiting shell (#1364)
Browse files Browse the repository at this point in the history
fix: fix nil pointer dereference when exiting shell.

Signed-off-by: Bingtan Lu <[email protected]>

Signed-off-by: Bingtan Lu <[email protected]>
  • Loading branch information
LuBingtan authored Jan 3, 2023
1 parent aae5e27 commit 095237d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (c generalClient) Attach() error {
logrus.Debug("waiting for shell to exit")
if err = session.Wait(); err != nil {
var ee *ssh.ExitError
if ok := errors.As(err, *ee); ok {
if ok := errors.As(err, &ee); ok {
switch ee.ExitStatus() {
case 130:
return nil
Expand Down

0 comments on commit 095237d

Please sign in to comment.