]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/lua: Unregister object during free
authorJeff Lucovsky <jeff@lucovsky.org>
Wed, 22 Apr 2020 23:12:26 +0000 (19:12 -0400)
committerVictor Julien <victor@inliniac.net>
Thu, 23 Apr 2020 05:28:03 +0000 (07:28 +0200)
This commit removes the registration for the object being freed.

src/detect-lua.c

index 5d0feeaf11deaa8a6773279fa40f53d1756ab021..9942e657a0c82c5b6896e1663071c401bb0c67dd 100644 (file)
@@ -1120,6 +1120,8 @@ static void DetectLuaFree(DetectEngineCtx *de_ctx, void *ptr)
         if (lua->filename)
             SCFree(lua->filename);
 
+        DetectUnregisterThreadCtxFuncs(de_ctx, NULL, lua, "lua");
+
         SCFree(lua);
     }
 }