Commit 453d71b9 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

server: Avoid invalid memory access when create_console_input fails.

parent 0f133aed
...@@ -330,6 +330,7 @@ static struct object *create_console_input( struct thread* renderer, int fd ) ...@@ -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 (!console_input->history || (renderer && !console_input->evt) || !console_input->event)
{ {
if (fd != -1) close( fd ); if (fd != -1) close( fd );
console_input->history_size = 0;
release_object( console_input ); release_object( console_input );
return NULL; return NULL;
} }
...@@ -1111,7 +1112,8 @@ static void console_input_destroy( struct object *obj ) ...@@ -1111,7 +1112,8 @@ static void console_input_destroy( struct object *obj )
release_object( console_in->evt ); release_object( console_in->evt );
console_in->evt = NULL; console_in->evt = NULL;
} }
release_object( console_in->event ); if (console_in->event)
release_object( console_in->event );
if (console_in->fd) if (console_in->fd)
release_object( console_in->fd ); release_object( console_in->fd );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment