mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-27 21:43:29 +01:00
Windows: close file handle if the call to GetFileSize fails.
This commit is contained in:
parent
51fa86b246
commit
b2438b5029
@ -7425,7 +7425,10 @@ char *LoadFile (const char *fileName, DWORD *size)
|
||||
return NULL;
|
||||
|
||||
if ((fileSize = GetFileSize (h, NULL)) == INVALID_FILE_SIZE)
|
||||
{
|
||||
CloseHandle (h);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*size = fileSize;
|
||||
buf = (char *) calloc (*size + 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user