James Hawkins : msi: Close the file handle returned by FindFirstFile.
Alexandre Julliard
julliard at winehq.org
Fri Dec 14 07:39:43 CST 2007
Module: wine
Branch: master
Commit: fa8476e7f6943749184bfef0e4e741bd6e429698
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa8476e7f6943749184bfef0e4e741bd6e429698
Author: James Hawkins <truiken at gmail.com>
Date: Thu Dec 13 18:38:33 2007 -0600
msi: Close the file handle returned by FindFirstFile.
---
dlls/msi/action.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 89f7bd7..2da9f13 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5194,8 +5194,8 @@ BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
path = wildcard_to_file(source, wfd.cFileName);
if (!path)
{
- free_list(&files);
- return FALSE;
+ res = FALSE;
+ goto done;
}
add_wildcard(&files, path, dest);
@@ -5208,8 +5208,8 @@ BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
file->dest = msi_realloc(file->dest, size * sizeof(WCHAR));
if (!file->dest)
{
- free_list(&files);
- return FALSE;
+ res = FALSE;
+ goto done;
}
lstrcpyW(strrchrW(file->dest, '\\') + 1, file->destname);
@@ -5224,7 +5224,12 @@ BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
free_file_entry(file);
}
- return TRUE;
+ res = TRUE;
+
+done:
+ free_list(&files);
+ FindClose(hfile);
+ return res;
}
static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
More information about the wine-cvs
mailing list