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:
parent
83e966d9e2
commit
4a7bb18428
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user