From 4f29a9336569adaa2c4e3222d80f54643f4e723c Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 18 Jan 2023 13:30:57 +0300 Subject: [PATCH] Driver: fortstat: Double check the closed state on flow deletion --- src/driver/fortstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/fortstat.c b/src/driver/fortstat.c index 2e2d8544..1229bf3c 100644 --- a/src/driver/fortstat.c +++ b/src/driver/fortstat.c @@ -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);