kernelbase: Fix a string leak in CreateProcessInternal (Valgrind).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Sven Baars 2020-04-18 22:06:46 +02:00 committed by Alexandre Julliard
parent 973138c068
commit a202ecd457
1 changed files with 2 additions and 0 deletions

View File

@ -182,10 +182,12 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
&cmdlineW, envW, &titleW, &desktopW,
NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
{
RtlFreeUnicodeString( &newdirW );
RtlReleasePath( load_path );
if (envW != env) RtlFreeHeap( GetProcessHeap(), 0, envW );
return NULL;
}
RtlFreeUnicodeString( &newdirW );
RtlReleasePath( load_path );
if (flags & CREATE_NEW_PROCESS_GROUP) params->ConsoleFlags = 1;