Commit 8ea62f2e authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

kernel32: Fix some string leaks (Coverity).

parent d2496e2d
......@@ -1775,11 +1775,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 );
......@@ -1917,6 +1919,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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment