1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: Fix various compiler warnings

This commit is contained in:
Mounir IDRASSI
2020-12-11 23:40:09 +01:00
parent b48d437c80
commit 21674c6aec
5 changed files with 14 additions and 9 deletions

View File

@@ -181,7 +181,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
#if !defined(_UEFI)
TC_EVENT keyDerivationCompletedEvent;
TC_EVENT noOutstandingWorkItemEvent;
KeyDerivationWorkItem *keyDerivationWorkItems;
KeyDerivationWorkItem *keyDerivationWorkItems = NULL;
KeyDerivationWorkItem *item;
size_t encryptionThreadCount = GetEncryptionThreadCount();
LONG outstandingWorkItemCount = 0;
@@ -589,8 +589,11 @@ ret:
{
TC_WAIT_EVENT (noOutstandingWorkItemEvent);
burn (keyDerivationWorkItems, sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
TCfree (keyDerivationWorkItems);
if (keyDerivationWorkItems)
{
burn (keyDerivationWorkItems, sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
TCfree (keyDerivationWorkItems);
}
#if !defined(DEVICE_DRIVER)
CloseHandle (keyDerivationCompletedEvent);