telnet: fix crash about telnet client connect

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-03-04 23:35:35 +08:00 committed by Masayuki Ishikawa
parent 1aebe47c71
commit 48493dac5b

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);