From 95652969eefa31f41b3919ab7796cd930e3c2c5c Mon Sep 17 00:00:00 2001 From: Gerardo Iglesias Galvan Date: Wed, 1 Jun 2011 12:03:40 -0500 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 8677e3e021..16e11ec70d 100644 --- a/src/detect-engine-tag.c +++ b/src/detect-engine-tag.c @@ -701,6 +701,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; } @@ -741,6 +742,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; }