From 8050c230ded858d59518fce751e28713dd4266f9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:25:36 +0200 Subject: Adding upstream version 3.5.1+dfsg1. Signed-off-by: Daniel Baumann --- channels/rdpdr/client/rdpdr_main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'channels/rdpdr/client') diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 2ffa951..8cbb359 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -1861,7 +1861,7 @@ UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s) UINT status = 0; rdpdrPlugin* plugin = (rdpdrPlugin*)rdpdr; - if (!rdpdr || !s) + if (!s) { Stream_Release(s); return CHANNEL_RC_NULL_DATA; @@ -1870,16 +1870,14 @@ UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s) if (!plugin) { Stream_Release(s); - status = CHANNEL_RC_BAD_INIT_HANDLE; - } - else - { - const size_t pos = Stream_GetPosition(s); - rdpdr_dump_send_packet(rdpdr->log, WLOG_TRACE, s, "[rdpdr-channel] send"); - status = plugin->channelEntryPoints.pVirtualChannelWriteEx( - plugin->InitHandle, plugin->OpenHandle, Stream_Buffer(s), pos, s); + return CHANNEL_RC_BAD_INIT_HANDLE; } + const size_t pos = Stream_GetPosition(s); + rdpdr_dump_send_packet(rdpdr->log, WLOG_TRACE, s, "[rdpdr-channel] send"); + status = plugin->channelEntryPoints.pVirtualChannelWriteEx( + plugin->InitHandle, plugin->OpenHandle, Stream_Buffer(s), pos, s); + if (status != CHANNEL_RC_OK) { Stream_Release(s); -- cgit v1.2.3