From e2d09fbd5e3b9742939a940e8aaa3aa8abae0a0e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 7 Oct 2025 14:38:23 +0200 Subject: [PATCH] unittests: clean memory in flow storage tests Before tests are started an init is already done, so don't overwrite an allocation. --- src/flow-storage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flow-storage.c b/src/flow-storage.c index 53b67ba630..1b28f8addf 100644 --- a/src/flow-storage.c +++ b/src/flow-storage.c @@ -88,6 +88,7 @@ static int FlowStorageTest01(void) { Flow *f = NULL; + StorageCleanup(); StorageInit(); FlowStorageId id1 = FlowStorageRegister("test", 8, StorageTestAlloc, StorageTestFree); @@ -169,6 +170,7 @@ static int FlowStorageTest02(void) { Flow *f = NULL; + StorageCleanup(); StorageInit(); FlowStorageId id1 = FlowStorageRegister("test", sizeof(void *), NULL, StorageTestFree); @@ -220,6 +222,7 @@ static int FlowStorageTest03(void) { Flow *f = NULL; + StorageCleanup(); StorageInit(); FlowStorageId id1 = FlowStorageRegister("test1", sizeof(void *), NULL, StorageTestFree);