From fa8476e7f6943749184bfef0e4e741bd6e429698 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Thu, 13 Dec 2007 18:38:33 -0600 Subject: [PATCH] msi: Close the file handle returned by FindFirstFile. --- dlls/msi/action.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 89f7bd7b6bc..2da9f13f62d 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 )