From 032c0164d14a226f2507e854ec5a2d8b58f9806f Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 14 Nov 2017 13:58:08 +0100 Subject: [PATCH] Fixed missing error check. --- libfreerdp/core/message.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libfreerdp/core/message.c b/libfreerdp/core/message.c index ef4c7361f..24035c4eb 100644 --- a/libfreerdp/core/message.c +++ b/libfreerdp/core/message.c @@ -196,13 +196,15 @@ static BOOL update_message_SetKeyboardIndicators(rdpContext* context, UINT16 led MakeMessageId(Update, SetKeyboardIndicators), (void*)(size_t)led_flags, NULL); } -static BOOL update_message_SetKeyboardImeStatus(rdpContext* context, UINT16 imeId, UINT32 imeState, UINT32 imeConvMode) +static BOOL update_message_SetKeyboardImeStatus(rdpContext* context, UINT16 imeId, UINT32 imeState, + UINT32 imeConvMode) { if (!context || !context->update) return FALSE; return MessageQueue_Post(context->update->queue, (void*) context, - MakeMessageId(Update, SetKeyboardImeStatus), (void*)(size_t)((imeId << 16UL) | imeState), (void*)(size_t) imeConvMode); + MakeMessageId(Update, SetKeyboardImeStatus), (void*)(size_t)((imeId << 16UL) | imeState), + (void*)(size_t) imeConvMode); } static BOOL update_message_RefreshRect(rdpContext* context, BYTE count, @@ -2632,7 +2634,7 @@ int update_message_queue_process_message(rdpUpdate* update, wMessage* message) update_message_free_class(message, msgClass, msgType); if (status < 0) - status = -1; + return -1; return 1; }