summaryrefslogtreecommitdiffstats
path: root/channels/rdpdr/client
diff options
context:
space:
mode:
Diffstat (limited to 'channels/rdpdr/client')
-rw-r--r--channels/rdpdr/client/rdpdr_main.c16
1 files changed, 7 insertions, 9 deletions
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);