kernel32: Fix some memory leaks in set_wow64_environment().
This commit is contained in:
parent
0512adff71
commit
4c200a2050
|
@ -605,9 +605,13 @@ static void set_wow64_environment(void)
|
|||
{
|
||||
if (is_win64 || is_wow64) SetEnvironmentVariableW( progw6432W, value );
|
||||
if (is_win64 || !is_wow64) SetEnvironmentVariableW( progfilesW, value );
|
||||
HeapFree( GetProcessHeap(), 0, value );
|
||||
}
|
||||
if (is_wow64 && (value = get_reg_value( hkey, progdir86W )))
|
||||
{
|
||||
SetEnvironmentVariableW( progfilesW, value );
|
||||
HeapFree( GetProcessHeap(), 0, value );
|
||||
}
|
||||
|
||||
/* set the CommonProgramFiles variables */
|
||||
|
||||
|
@ -615,9 +619,13 @@ static void set_wow64_environment(void)
|
|||
{
|
||||
if (is_win64 || is_wow64) SetEnvironmentVariableW( commonw6432W, value );
|
||||
if (is_win64 || !is_wow64) SetEnvironmentVariableW( commonfilesW, value );
|
||||
HeapFree( GetProcessHeap(), 0, value );
|
||||
}
|
||||
if (is_wow64 && (value = get_reg_value( hkey, commondir86W )))
|
||||
{
|
||||
SetEnvironmentVariableW( commonfilesW, value );
|
||||
HeapFree( GetProcessHeap(), 0, value );
|
||||
}
|
||||
|
||||
NtClose( hkey );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue