if (c) {
if (c && !c->closes) {
void sshfwd_close(struct ssh_channel *c) {    if (c) {        if (ssh_version == 1) {            send_packet(SSH1_MSG_CHANNEL_CLOSE, PKT_INT, c->remoteid, PKT_END);        } else {            ssh2_pkt_init(SSH2_MSG_CHANNEL_CLOSE);            ssh2_pkt_adduint32(c->remoteid);            ssh2_pkt_send();        }        c->closes = 1;        if (c->type == CHAN_X11) {            c->u.x11.s = NULL;            logevent("X11 connection terminated");        }    }}