=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.258 retrieving revision 1.259 diff -u -r1.258 -r1.259 --- src/usr.bin/ssh/clientloop.c 2014/02/02 03:44:31 1.258 +++ src/usr.bin/ssh/clientloop.c 2014/04/29 13:10:30 1.259 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.258 2014/02/02 03:44:31 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.259 2014/04/29 13:10:30 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2036,7 +2036,7 @@ } packet_check_eom(); } - if (reply && c != NULL) { + if (reply && c != NULL && !(c->flags & CHAN_CLOSE_SENT)) { packet_start(success ? SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); packet_put_int(c->remote_id);