1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08: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:
Mounir IDRASSI
2025-09-08 11:40:33 +09:00
parent f40f316dfb
commit 7df2c2957f

View File

@@ -1046,6 +1046,7 @@ static VOID MainThreadProc (PVOID threadArg)
request = GetPoolBuffer (queue, sizeof (EncryptedIoRequest));
if (!request)
{
InterlockedDecrement(&queue->IoThreadPendingRequestCount);
CompleteOriginalIrp (item, STATUS_INSUFFICIENT_RESOURCES, 0);
break;
}