mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows driver fix: Decrement IoThreadPendingRequestCount on allocation failure in MainThreadProc
Added InterlockedDecrement in the error path when GetPoolBuffer fails for EncryptedIoRequest to ensure accurate tracking of pending IO requests and prevent potential resource leaks.
This commit is contained in:
@@ -1046,6 +1046,7 @@ static VOID MainThreadProc (PVOID threadArg)
|
|||||||
request = GetPoolBuffer (queue, sizeof (EncryptedIoRequest));
|
request = GetPoolBuffer (queue, sizeof (EncryptedIoRequest));
|
||||||
if (!request)
|
if (!request)
|
||||||
{
|
{
|
||||||
|
InterlockedDecrement(&queue->IoThreadPendingRequestCount);
|
||||||
CompleteOriginalIrp (item, STATUS_INSUFFICIENT_RESOURCES, 0);
|
CompleteOriginalIrp (item, STATUS_INSUFFICIENT_RESOURCES, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user