core/info: Fix leak found by covscan

leaked_storage: Variable "wString" going out of scope leaks the storage it points to.
This commit is contained in:
Ondrej Holy 2018-08-17 16:10:26 +02:00
parent 83e966d9e2
commit 4a7bb18428

View File

@ -1218,7 +1218,10 @@ static BOOL rdp_write_logon_info_v1(wStream* s, logon_info* info)
len *= 2;
if (len > 52)
{
free(wString);
return FALSE;
}
Stream_Write_UINT32(s, len);
Stream_Write(s, wString, len);
@ -1233,7 +1236,10 @@ static BOOL rdp_write_logon_info_v1(wStream* s, logon_info* info)
len *= 2;
if (len > 512)
{
free(wString);
return FALSE;
}
Stream_Write_UINT32(s, len);
Stream_Write(s, wString, len);