summaryrefslogtreecommitdiffhomepage
path: root/svr-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-20 22:47:19 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-20 22:47:19 +0800
commitc1694230516fe1c3d78e4fd23aebd5fbc00ce21c (patch)
tree613a04012ce46ddecb6216301c7cca710cf17aac /svr-session.c
parentfdc6f323923b36add7ab7112b1b4d05368bd5902 (diff)
glaring wrapfd problems fixed
--HG-- branch : fuzz
Diffstat (limited to 'svr-session.c')
-rw-r--r--svr-session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/svr-session.c b/svr-session.c
index 8cb0ea9..a1466fe 100644
--- a/svr-session.c
+++ b/svr-session.c
@@ -245,7 +245,9 @@ void svr_dropbear_log(int priority, const char* format, va_list param) {
static void svr_remoteclosed() {
m_close(ses.sock_in);
- m_close(ses.sock_out);
+ if (ses.sock_in != ses.sock_out) {
+ m_close(ses.sock_out);
+ }
ses.sock_in = -1;
ses.sock_out = -1;
dropbear_close("Exited normally");