Sebastian Lackner : server: Avoid invalid memory access when create_console_input fails.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 19 09:56:02 CDT 2015


Module: wine
Branch: master
Commit: 453d71b9f7c8f99822a58ecaab5b51dbd96c799e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=453d71b9f7c8f99822a58ecaab5b51dbd96c799e

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Wed Aug 19 12:44:02 2015 +0200

server: Avoid invalid memory access when create_console_input fails.

---

 server/console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/console.c b/server/console.c
index 0bb1824..10b1350 100644
--- a/server/console.c
+++ b/server/console.c
@@ -330,6 +330,7 @@ static struct object *create_console_input( struct thread* renderer, int fd )
     if (!console_input->history || (renderer && !console_input->evt) || !console_input->event)
     {
         if (fd != -1) close( fd );
+        console_input->history_size = 0;
         release_object( console_input );
         return NULL;
     }
@@ -1111,7 +1112,8 @@ static void console_input_destroy( struct object *obj )
         release_object( console_in->evt );
         console_in->evt = NULL;
     }
-    release_object( console_in->event );
+    if (console_in->event)
+        release_object( console_in->event );
     if (console_in->fd)
         release_object( console_in->fd );
 




More information about the wine-cvs mailing list