Module: wine Branch: refs/heads/master Commit: d8058fbe8cbd6fd8c30baa1d3b9688dfe8b47ddf URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d8058fbe8cbd6fd8c30baa1d...
Author: Robert Shearman rob@codeweavers.com Date: Fri Apr 7 11:15:19 2006 +0100
server: Should use release_object on an object instead of free.
---
server/queue.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 2b3f89c..f26197d 100644 --- a/server/queue.c +++ b/server/queue.c @@ -205,11 +205,6 @@ static struct thread_input *create_threa
if ((input = alloc_object( &thread_input_ops ))) { - if (!(input->desktop = get_thread_desktop( thread, 0 /* FIXME: access rights */ ))) - { - free( input ); - return NULL; - } input->focus = 0; input->capture = 0; input->active = 0; @@ -218,6 +213,12 @@ static struct thread_input *create_threa list_init( &input->msg_list ); set_caret_window( input, 0 ); memset( input->keystate, 0, sizeof(input->keystate) ); + + if (!(input->desktop = get_thread_desktop( thread, 0 /* FIXME: access rights */ ))) + { + release_object( input ); + return NULL; + } } return input; } @@ -855,7 +856,7 @@ static void thread_input_destroy( struct
if (foreground_input == input) foreground_input = NULL; empty_msg_list( &input->msg_list ); - release_object( input->desktop ); + if (input->desktop) release_object( input->desktop ); }
/* fix the thread input data when a window is destroyed */