mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[CABMAN]
Leak less resources svn path=/trunk/; revision=53731
This commit is contained in:
parent
fef1e2d451
commit
81495a4e8f
1 changed files with 6 additions and 0 deletions
|
@ -1155,12 +1155,14 @@ ULONG CCabinet::ExtractFile(char* FileName)
|
|||
if (Offset == INVALID_SET_FILE_POINTER)
|
||||
{
|
||||
DPRINT(MIN_TRACE, ("SetFilePointer() failed, error code is %u.\n", (UINT)GetLastError()));
|
||||
CloseFile(DestFile);
|
||||
return CAB_STATUS_INVALID_CAB;
|
||||
}
|
||||
#else
|
||||
if (fseek(FileHandle, (off_t)File->DataBlock->AbsoluteOffset, SEEK_SET) != 0)
|
||||
{
|
||||
DPRINT(MIN_TRACE, ("fseek() failed.\n"));
|
||||
CloseFile(DestFile);
|
||||
return CAB_STATUS_FAILURE;
|
||||
}
|
||||
Offset = ftell(FileHandle);
|
||||
|
@ -2039,6 +2041,7 @@ ULONG CCabinet::AddFile(char* FileName)
|
|||
{
|
||||
DPRINT(MIN_TRACE, ("Insufficient memory.\n"));
|
||||
FreeMemory(NewFileName);
|
||||
CloseFile(SrcFile);
|
||||
return CAB_STATUS_NOMEMORY;
|
||||
}
|
||||
|
||||
|
@ -2051,6 +2054,7 @@ ULONG CCabinet::AddFile(char* FileName)
|
|||
{
|
||||
DPRINT(MIN_TRACE, ("Cannot read from file.\n"));
|
||||
FreeMemory(NewFileName);
|
||||
CloseFile(SrcFile);
|
||||
return CAB_STATUS_CANNOT_READ;
|
||||
}
|
||||
|
||||
|
@ -2058,6 +2062,7 @@ ULONG CCabinet::AddFile(char* FileName)
|
|||
{
|
||||
DPRINT(MIN_TRACE, ("Cannot read file times.\n"));
|
||||
FreeMemory(NewFileName);
|
||||
CloseFile(SrcFile);
|
||||
return CAB_STATUS_CANNOT_READ;
|
||||
}
|
||||
|
||||
|
@ -2065,6 +2070,7 @@ ULONG CCabinet::AddFile(char* FileName)
|
|||
{
|
||||
DPRINT(MIN_TRACE, ("Cannot read file attributes.\n"));
|
||||
FreeMemory(NewFileName);
|
||||
CloseFile(SrcFile);
|
||||
return CAB_STATUS_CANNOT_READ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue