From 0ca09ecbcd1d67106f45abfce2e03f185382e2a7 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 19 Sep 2022 10:40:14 -0600 Subject: [PATCH] detect: fix user after free in debug log Found by gcc 12.2.1. --- src/detect-engine-iponly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-engine-iponly.c b/src/detect-engine-iponly.c index d9030b0373..e9604384a3 100644 --- a/src/detect-engine-iponly.c +++ b/src/detect-engine-iponly.c @@ -462,8 +462,8 @@ void IPOnlyCIDRListFree(IPOnlyCIDRItem *tmphead) while (it != NULL) { i++; - SCFree(it); SCLogDebug("Item(%p) %"PRIu32" removed", it, i); + SCFree(it); it = next; if (next != NULL) -- 2.47.2