channels: cliprdr: client: fix leak in cliprdr_packet_send
authorkubistika <kmizrachi18@gmail.com>
Fri, 18 Oct 2019 12:02:59 +0000 (15:02 +0300)
committerakallabeth <akallabeth@users.noreply.github.com>
Fri, 18 Oct 2019 12:20:26 +0000 (14:20 +0200)
channels/cliprdr/client/cliprdr_main.c

index d8e1c47..8238c2d 100644 (file)
@@ -96,8 +96,11 @@ static UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
        }
 
        if (status != CHANNEL_RC_OK)
+       {
+               Stream_Free(s, TRUE);
                WLog_ERR(TAG, "VirtualChannelWrite failed with %s [%08"PRIX32"]",
                         WTSErrorToString(status), status);
+       }
 
        return status;
 }