Haidong Yu : conhost: Input should be restored and input_thread handle should be closed before return.

Alexandre Julliard julliard at winehq.org
Wed Sep 23 15:47:14 CDT 2020


Module: wine
Branch: master
Commit: d22e82196496cb6d7f26b984b95409678a76c602
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d22e82196496cb6d7f26b984b95409678a76c602

Author: Haidong Yu <yuhaidong at uniontech.com>
Date:   Wed Sep 23 09:31:43 2020 +0800

conhost: Input should be restored and input_thread handle should be closed before return.

Signed-off-by: Haidong Yu <yuhaidong at uniontech.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/conhost/conhost.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index a775e74961..79cbb8e83a 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -1652,7 +1652,7 @@ static DWORD WINAPI tty_input( void *param )
             {
             case 3: /* end of text */
                 LeaveCriticalSection( &console_section );
-                return 0;
+                goto done;
             case '\n':
                 key_press( console, '\n', VK_RETURN, LEFT_CTRL_PRESSED );
                 break;
@@ -1681,6 +1681,7 @@ static DWORD WINAPI tty_input( void *param )
 
     TRACE( "NtReadFile failed: %#x\n", status );
 
+done:
     EnterCriticalSection( &console_section );
     if (console->read_ioctl) read_complete( console, status, NULL, 0, FALSE );
     if (console->is_unix)




More information about the wine-cvs mailing list