From: Eric Leblond Date: Thu, 6 Sep 2012 09:31:42 +0000 (+0200) Subject: defrag: be sure to output NULL tracker X-Git-Tag: suricata-1.4beta1~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e6a4c65f691e2e3c72670d89a1634a903c81d26;p=thirdparty%2Fsuricata.git 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. --- 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; } }