telnet: fix crash about telnet client connect

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2021-03-05 06:55:17 +09:00
committed by Masayuki Ishikawa
parent 1aebe47c71
commit 48493dac5b
+2 -2
View File
@@ -1070,9 +1070,9 @@ static int telnet_session(FAR struct telnet_session_s *session)
goto errout_with_semaphore;
}
/* Close the original psoock (keeping the clone) */
/* Close the original psock (keeping the clone) */
psock_close(psock);
nx_close(session->ts_sd);
#ifdef CONFIG_TELNET_SUPPORT_NAWS
telnet_sendopt(priv, TELNET_DO, TELNET_NAWS);