[core,server] FreeRDP_WTSVirtualChannelRead checks

Properly check MessageQueue_Peek return and propagate failure.
This commit is contained in:
Armin Novak
2026-03-03 16:44:36 +01:00
parent 7485c01a8c
commit 45494b02a3

View File

@@ -1656,8 +1656,10 @@ BOOL WINAPI FreeRDP_WTSVirtualChannelRead(HANDLE hChannelHandle, WINPR_ATTR_UNUS
if (messageCtx->offset >= messageCtx->length)
{
(void)MessageQueue_Peek(channel->queue, &message, TRUE);
const int rc = MessageQueue_Peek(channel->queue, &message, TRUE);
peer_channel_queue_free_message(&message);
if (rc < 0)
return FALSE;
}
return TRUE;