[WINESYNC] msi: Don't leak the file handle on error in cabinet_close_file_info().

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id a0a800ab1bd174e78b03d4592d1caca0322cd1c9 by Hans Leidekker <hans@codeweavers.com>
This commit is contained in:
winesync 2022-03-13 23:53:17 +01:00 committed by Mark Jansen
parent bdddd67734
commit e097431ffc
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -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;