Driver: fortstat: Double check the closed state on flow deletion

This commit is contained in:
Nodir Temirkhodjaev 2023-01-18 13:30:57 +03:00
parent 819f6aa322
commit 4f29a93365

View File

@ -515,7 +515,7 @@ FORT_API void fort_flow_delete(PFORT_STAT stat, UINT64 flowContext)
KLOCK_QUEUE_HANDLE lock_queue;
KeAcquireInStackQueuedSpinLock(&stat->lock, &lock_queue);
{
if ((fort_stat_flags(stat) & FORT_STAT_CLOSED) == 0) {
fort_flow_free(stat, flow);
}
KeReleaseInStackQueuedSpinLock(&lock_queue);