https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e097431ffcfad9b8fa8c2…
commit e097431ffcfad9b8fa8c29155833001d4f102589
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 23:53:17 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:40 2022 +0100
[WINESYNC] msi: Don't leak the file handle on error in cabinet_close_file_info().
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id a0a800ab1bd174e78b03d4592d1caca0322cd1c9 by Hans Leidekker
<hans(a)codeweavers.com>
---
dll/win32/msi/media.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dll/win32/msi/media.c b/dll/win32/msi/media.c
index cc4648481ba..af6e83b893e 100644
--- a/dll/win32/msi/media.c
+++ b/dll/win32/msi/media.c
@@ -507,16 +507,23 @@ static INT_PTR cabinet_close_file_info(FDINOTIFICATIONTYPE fdint,
data->mi->is_continuous = FALSE;
if (!DosDateTimeToFileTime(pfdin->date, pfdin->time, &ft))
+ {
+ CloseHandle(handle);
return -1;
+ }
if (!LocalFileTimeToFileTime(&ft, &ftLocal))
+ {
+ CloseHandle(handle);
return -1;
+ }
if (!SetFileTime(handle, &ftLocal, 0, &ftLocal))
+ {
+ CloseHandle(handle);
return -1;
+ }
CloseHandle(handle);
-
- data->cb(data->package, data->curfile, MSICABEXTRACT_FILEEXTRACTED, NULL,
NULL,
- data->user);
+ data->cb(data->package, data->curfile, MSICABEXTRACT_FILEEXTRACTED, NULL,
NULL, data->user);
msi_free(data->curfile);
data->curfile = NULL;