output: harden output deinit

If thread setup fails allow output deinit code to be called with
NULL data without crashing.
pull/2942/head
Victor Julien 9 years ago
parent 9fdecfffc1
commit aab2548df5

@ -966,6 +966,9 @@ TmEcode OutputLoggerThreadInit(ThreadVars *tv, void *initdata, void **data)
TmEcode OutputLoggerThreadDeinit(ThreadVars *tv, void *thread_data)
{
if (thread_data == NULL)
return TM_ECODE_FAILED;
LoggerThreadStore *thread_store = (LoggerThreadStore *)thread_data;
RootLogger *logger = TAILQ_FIRST(&RootLoggers);
LoggerThreadStoreNode *thread_store_node = TAILQ_FIRST(thread_store);

Loading…
Cancel
Save