Add null check for ssh parameter (#219)

fix for https://github.com/PowerShell/Win32-OpenSSH/issues/905
This commit is contained in:
Yanbing 2017-10-05 18:37:22 -07:00 committed by GitHub
parent 97565d8b4f
commit be80763b87
1 changed files with 2 additions and 0 deletions

View File

@ -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,