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 );