mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows driver: add defensive checks to TCCloseVolume implementation
This commit is contained in:
@@ -910,8 +910,13 @@ void TCCloseVolume (PDEVICE_OBJECT DeviceObject, PEXTENSION Extension)
|
||||
RestoreTimeStamp (Extension);
|
||||
}
|
||||
ZwClose (Extension->hDeviceFile);
|
||||
Extension->hDeviceFile = NULL;
|
||||
}
|
||||
if (Extension->pfoDeviceFile != NULL)
|
||||
{
|
||||
ObDereferenceObject (Extension->pfoDeviceFile);
|
||||
Extension->pfoDeviceFile = NULL;
|
||||
}
|
||||
ObDereferenceObject (Extension->pfoDeviceFile);
|
||||
if (Extension->cryptoInfo)
|
||||
{
|
||||
crypto_close (Extension->cryptoInfo);
|
||||
|
||||
Reference in New Issue
Block a user