From e866aa3e15d7aa9d6a1c6aeac3a4425f8e06d0a5 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 27 May 2011 09:58:01 +0200 Subject: [PATCH] Fix TAG removal in certain conditions. --- src/detect-engine-tag.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/detect-engine-tag.c b/src/detect-engine-tag.c index 38013c3aea..5dbff553e7 100644 --- a/src/detect-engine-tag.c +++ b/src/detect-engine-tag.c @@ -703,6 +703,7 @@ static void TagTimeoutRemove(DetectTagHostCtx *tag_ctx, struct timeval *tv) while (tmp != NULL) { if ((tv->tv_sec - tmp->last_ts.tv_sec) <= TAG_MAX_LAST_TIME_SEEN) { + prev = tmp; tmp = tmp->next; continue; } @@ -743,6 +744,7 @@ static void TagTimeoutRemove(DetectTagHostCtx *tag_ctx, struct timeval *tv) while (tmp != NULL) { if ((tv->tv_sec - tmp->last_ts.tv_sec) <= TAG_MAX_LAST_TIME_SEEN) { + prev = tmp; tmp = tmp->next; continue; }