From be80763b879f1885764f23f9e5201054d007f0e5 Mon Sep 17 00:00:00 2001 From: Yanbing Date: Thu, 5 Oct 2017 18:37:22 -0700 Subject: [PATCH] Add null check for ssh parameter (#219) fix for https://github.com/PowerShell/Win32-OpenSSH/issues/905 --- channels.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/channels.c b/channels.c index 2e920e9eb..b867ce01b 100644 --- a/channels.c +++ b/channels.c @@ -3963,6 +3963,8 @@ channel_disable_adm_local_opens(struct ssh *ssh) void channel_clear_permitted_opens(struct ssh *ssh) { + if(ssh == NULL) + return; struct ssh_channels *sc = ssh->chanctxt; sc->permitted_opens = xrecallocarray(sc->permitted_opens,