diff options
Diffstat (limited to 'channels/cliprdr/server/cliprdr_main.c')
-rw-r--r-- | channels/cliprdr/server/cliprdr_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index 9823f17..23a4331 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -119,7 +119,6 @@ static UINT cliprdr_server_capabilities(CliprdrServerContext* context, const CLIPRDR_CAPABILITIES* capabilities) { size_t offset = 0; - wStream* s = NULL; WINPR_ASSERT(context); WINPR_ASSERT(capabilities); @@ -135,7 +134,7 @@ static UINT cliprdr_server_capabilities(CliprdrServerContext* context, return ERROR_INVALID_PARAMETER; } - s = cliprdr_packet_new(CB_CLIP_CAPS, 0, 4 + CB_CAPSTYPE_GENERAL_LEN); + wStream* s = cliprdr_packet_new(CB_CLIP_CAPS, 0, 4 + CB_CAPSTYPE_GENERAL_LEN); if (!s) { @@ -173,6 +172,7 @@ static UINT cliprdr_server_capabilities(CliprdrServerContext* context, if (!Stream_SafeSeek(s, cap->capabilitySetLength)) { WLog_ERR(TAG, "short stream"); + Stream_Free(s, TRUE); return ERROR_NO_DATA; } break; |