Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/kernel32/profile.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index bfaba6cdeb0..38528099a92 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1777,11 +1777,13 @@ BOOL WINAPI WritePrivateProfileSectionW( LPCWSTR section, RegCloseKey( section_key ); if (res) { + HeapFree( GetProcessHeap(), 0, entry_copy ); SetLastError( res ); RegCloseKey( key ); return FALSE; } } + HeapFree( GetProcessHeap(), 0, entry_copy ); } } RegCloseKey( key ); @@ -1919,6 +1921,7 @@ DWORD WINAPI GetPrivateProfileSectionNamesW( LPWSTR buffer, DWORD size, { lstrcpynW( buffer + ret, section, size - ret - 1 ); ret = min( ret + strlenW( section ) + 1, size - 1 ); + HeapFree( GetProcessHeap(), 0, section ); }
RegCloseKey( key );
Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/kernel32/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 38528099a92..8f658f1e05a 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1290,7 +1290,7 @@ static BOOL delete_section( const WCHAR *filename, const WCHAR *section ) { if (!(path = get_key_value( subkey, entry ))) { - HeapFree( GetProcessHeap(), 0, path ); + HeapFree( GetProcessHeap(), 0, entry ); continue; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=77519
Your paranoid android.
=== debiant (32 bit Chinese:China report) ===
kernel32: process.c:1608: Test failed: Console:winRight expected 79, but got 80