From: Victor Julien Date: Thu, 2 May 2019 14:30:57 +0000 (+0200) Subject: detect/thread: ctx info is allowed to have NULL data X-Git-Tag: suricata-5.0.0-rc1~529 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78c6ff71459ed5f48a8756b489a28bb11abafee;p=thirdparty%2Fsuricata.git detect/thread: ctx info is allowed to have NULL data --- diff --git a/src/detect-engine.c b/src/detect-engine.c index b3cf753b95..7d83842d84 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -2618,7 +2618,7 @@ void DetectEngineThreadCtxInfo(ThreadVars *t, DetectEngineThreadCtx *det_ctx) * \param de_ctx detection engine to register in * \param name keyword name for error printing * \param InitFunc function ptr - * \param data keyword init data to pass to Func + * \param data keyword init data to pass to Func. Can be NULL. * \param FreeFunc function ptr * \param mode 0 normal (ctx per keyword instance) 1 shared (one ctx per det_ct) * @@ -2631,7 +2631,7 @@ void DetectEngineThreadCtxInfo(ThreadVars *t, DetectEngineThreadCtx *det_ctx) */ int DetectRegisterThreadCtxFuncs(DetectEngineCtx *de_ctx, const char *name, void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *), int mode) { - BUG_ON(de_ctx == NULL || InitFunc == NULL || FreeFunc == NULL || data == NULL); + BUG_ON(de_ctx == NULL || InitFunc == NULL || FreeFunc == NULL); if (mode) { DetectEngineThreadKeywordCtxItem *item = de_ctx->keyword_list;