mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
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>
This commit is contained in:
parent
c8e2802391
commit
a0a800ab1b
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue