kernel32: Fix a leak in ReplaceFileW.

This commit is contained in:
Nikolay Sivov 2009-12-22 03:13:53 +03:00 committed by Alexandre Julliard
parent 6cc141ff59
commit 14058ccf25
1 changed files with 1 additions and 0 deletions

View File

@ -1593,6 +1593,7 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa
NULL, 0);
if (status == STATUS_SUCCESS)
status = wine_nt_to_unix_file_name(&nt_backup_name, &unix_backup_name, FILE_OPEN_IF, FALSE);
RtlFreeUnicodeString(&nt_backup_name);
if (status != STATUS_SUCCESS)
{
error = RtlNtStatusToDosError(status);