channels: Bugfix for a possible invalid pointer usage (channel->session) in various places
channels: Bugfix for a possible invalid pointer usage (channel->session) in various places

BUG: https://red.libssh.org/issues/230

Signed-off-by: David Kedves <7fbf701f8bb1c5ecbc196f4d1891cd930b1fec5a@severalnines.com>
Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

kedazo/libssh,kedazo/libssh,kedazo/libssh,kedazo/libssh