kernel32: Fix a memory leak in MoveFileWithProgressW (Valgrind).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2020-04-18 16:13:21 +02:00 committed by Alexandre Julliard
parent 9ce4383128
commit 1b6b0cda7a
1 changed files with 1 additions and 0 deletions

View File

@ -502,6 +502,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
memcpy( rename_info->FileName, nt_name.Buffer, nt_name.Length );
RtlFreeUnicodeString( &nt_name );
status = NtSetInformationFile( source_handle, &io, rename_info, size, FileRenameInformation );
HeapFree( GetProcessHeap(), 0, rename_info );
if (status == STATUS_NOT_SAME_DEVICE && (flag & MOVEFILE_COPY_ALLOWED))
{
NtClose( source_handle );