core/info: Silence false positive warnings from covscan
Change the code a bit to silence false positive warnings from covscan.
pass_freed_arg: Passing freed pointer "wString" as an argument to "Stream_Write".
pass_freed_arg: Passing freed pointer "wString" as an argument to "Stream_Write".
@@ -1228,6 +1228,7 @@ static BOOL rdp_write_logon_info_v1(wStream* s, logon_info* info)
Stream_Seek(s, 52 - len);
free(wString);
/* username */
+ wString = NULL;
len = ConvertToUnicode(CP_UTF8, 0, info->username, -1, &wString, 0);
if (len < 0)
@@ -1274,6 +1275,7 @@ static BOOL rdp_write_logon_info_v2(wStream* s, logon_info* info)
Stream_Write(s, wString, len * 2);
free(wString);
+ wString = NULL;
len = ConvertToUnicode(CP_UTF8, 0, info->username, -1, &wString, 0);
if (len < 0)
