]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/thread: ctx info is allowed to have NULL data
authorVictor Julien <victor@inliniac.net>
Thu, 2 May 2019 14:30:57 +0000 (16:30 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 3 May 2019 10:35:36 +0000 (12:35 +0200)
src/detect-engine.c

index b3cf753b951d750b4ad6d0b297a111211673a535..7d83842d840d41715e7327760331394ebe114e85 100644 (file)
@@ -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;