From: Carlos Rivera Subject: [PATCH v2 2/2] kernel32/profile: Replace NULL filename argument with "win.ini". Message-Id: <20200905201123.280620-2-carlos@superkaos.org> Date: Sat, 5 Sep 2020 22:11:23 +0200 In-Reply-To: <20200905201123.280620-1-carlos@superkaos.org> References: <20200905201123.280620-1-carlos@superkaos.org> So do in open_file_mapping_key as PROFILE_Open does. Signed-off-by: Carlos Rivera --- v2: fixed the wording of the commit. dlls/kernel32/profile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 43b303fa25..c987c3f6b9 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1028,6 +1028,9 @@ static HKEY open_file_mapping_key( const WCHAR *filename ) static HKEY mapping_key; HKEY key; + if (!filename) + filename = wininiW; + EnterCriticalSection( &PROFILE_CritSect ); if (!mapping_key && RegOpenKeyExW( HKEY_LOCAL_MACHINE, mapping_pathW, 0, KEY_WOW64_64KEY, &mapping_key )) -- 2.28.0