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

Windows: Fix wrong parameter to CloseHandle function in case of failure of CreateEvent (Coverity)

This commit is contained in:
Mounir IDRASSI
2022-03-26 18:43:28 +01:00
parent 69a9c6b394
commit 533269ca9a

View File

@@ -285,7 +285,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
*noOutstandingWorkItemEvent = CreateEvent (NULL, FALSE, TRUE, NULL); *noOutstandingWorkItemEvent = CreateEvent (NULL, FALSE, TRUE, NULL);
if (!*noOutstandingWorkItemEvent) if (!*noOutstandingWorkItemEvent)
{ {
CloseHandle (keyDerivationCompletedEvent); CloseHandle (*keyDerivationCompletedEvent);
TCfree (keyDerivationWorkItems); TCfree (keyDerivationWorkItems);
TCfree(keyDerivationCompletedEvent); TCfree(keyDerivationCompletedEvent);
TCfree(noOutstandingWorkItemEvent); TCfree(noOutstandingWorkItemEvent);