Nikolay Sivov : kernel32: Fix a leak in ReplaceFileW.

Alexandre Julliard julliard at winehq.org
Tue Dec 22 09:58:58 CST 2009


Module: wine
Branch: master
Commit: 14058ccf2553f9deb6fe8c6b58624938d5dc5cd7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=14058ccf2553f9deb6fe8c6b58624938d5dc5cd7

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue Dec 22 03:13:53 2009 +0300

kernel32: Fix a leak in ReplaceFileW.

---

 dlls/kernel32/file.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 8932dea..5c7ba20 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -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);




More information about the wine-cvs mailing list