Add defensive check to channels.c

In functions of channel.c channel->session->alive is checked, but there's no check that channel->session is not NULL (ssh_session is a pointer to a struct).

{
    if (channel == NULL) {
        return SSH_ERROR;
    }
    return (channel->state != SSH_CHANNEL_STATE_OPEN || channel->session->alive == 0);
}

Only for channel closed function is was added using #239 (closed)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information