You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/03/04 21:55:29 UTC

[incubator-nuttx] branch master updated: telnet: fix crash about telnet client connect

This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 48493da  telnet: fix crash about telnet client connect
48493da is described below

commit 48493dac5b392b1e54c7f52f3c2997d2da9c07be
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu Mar 4 23:35:35 2021 +0800

    telnet: fix crash about telnet client connect
    
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 drivers/net/telnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c
index e09d965..c21c24a 100644
--- a/drivers/net/telnet.c
+++ b/drivers/net/telnet.c
@@ -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);