From 4e6a4c65f691e2e3c72670d89a1634a903c81d26 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 6 Sep 2012 11:31:42 +0200 Subject: [PATCH] defrag: be sure to output NULL tracker Coverity 720337 pointed out a use after free. We can't be dependent to HashListTableAdd outputting a NULL tracker. --- src/defrag.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/defrag.c b/src/defrag.c index 0e017c677b..a221aa9def 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -1169,6 +1169,7 @@ DefragGetTracker(ThreadVars *tv, DecodeThreadVars *dtv, DefragContext *dc, SCMutexLock(&dc->tracker_pool_lock); PoolReturn(dc->tracker_pool, tracker); SCMutexUnlock(&dc->tracker_pool_lock); + tracker = NULL; goto done; } }