From aa3fcc71a44e3f9c76543f4fe572d9b645b4abe8 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 19 Feb 2020 10:17:12 -0700 Subject: [PATCH] fix for scan-build warning --- src/ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssh.c b/src/ssh.c index a476a3b..d290641 100644 --- a/src/ssh.c +++ b/src/ssh.c @@ -878,7 +878,7 @@ int wolfSSH_shutdown(WOLFSSH* ssh) if (ret == WS_SUCCESS) ret = SendDisconnect(ssh, WOLFSSH_DISCONNECT_BY_APPLICATION); - if (ssh->channelList == NULL) { + if (ssh != NULL && ssh->channelList == NULL) { WLOG(WS_LOG_DEBUG, "channel list was already removed"); ret = WS_SUCCESS; }