summaryrefslogtreecommitdiffstats
path: root/channels/urbdrc/client/data_transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/urbdrc/client/data_transfer.c')
-rw-r--r--channels/urbdrc/client/data_transfer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/urbdrc/client/data_transfer.c b/channels/urbdrc/client/data_transfer.c
index 7a7e5a2..56f3267 100644
--- a/channels/urbdrc/client/data_transfer.c
+++ b/channels/urbdrc/client/data_transfer.c
@@ -705,7 +705,10 @@ static UINT urb_control_transfer(IUDEVICE* pdev, GENERIC_CHANNEL_CALLBACK* callb
if (transferDir == USBD_TRANSFER_DIRECTION_OUT)
{
if (!Stream_CheckAndLogRequiredLength(TAG, s, OutputBufferSize))
+ {
+ Stream_Free(out, TRUE);
return ERROR_INVALID_DATA;
+ }
Stream_Copy(s, out, OutputBufferSize);
}