summaryrefslogtreecommitdiffstats
path: root/channels/rdpdr/server/rdpdr_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/rdpdr/server/rdpdr_main.c')
-rw-r--r--channels/rdpdr/server/rdpdr_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/rdpdr/server/rdpdr_main.c b/channels/rdpdr/server/rdpdr_main.c
index bad6e23..f5353e3 100644
--- a/channels/rdpdr/server/rdpdr_main.c
+++ b/channels/rdpdr/server/rdpdr_main.c
@@ -2278,7 +2278,10 @@ static UINT rdpdr_server_send_device_create_request(RdpdrServerContext* context,
/* Convert the path to Unicode. */
if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path,
pathLength / sizeof(WCHAR), TRUE) < 0)
+ {
+ Stream_Free(s, TRUE);
return ERROR_INTERNAL_ERROR;
+ }
return rdpdr_seal_send_free_request(context, s);
}
@@ -2418,7 +2421,10 @@ static UINT rdpdr_server_send_device_query_directory_request(RdpdrServerContext*
{
if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path,
pathLength / sizeof(WCHAR), TRUE) < 0)
+ {
+ Stream_Free(s, TRUE);
return ERROR_INTERNAL_ERROR;
+ }
}
return rdpdr_seal_send_free_request(context, s);
@@ -2468,7 +2474,10 @@ static UINT rdpdr_server_send_device_file_rename_request(RdpdrServerContext* con
{
if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path,
pathLength / sizeof(WCHAR), TRUE) < 0)
+ {
+ Stream_Free(s, TRUE);
return ERROR_INTERNAL_ERROR;
+ }
}
return rdpdr_seal_send_free_request(context, s);