From a23add0194979632bcb70db5e6599d7b1178299a Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Mon, 3 Nov 2025 11:21:30 +0530 Subject: [PATCH] detect/lua: remove extra NULL check The fn DetectLuaFree checks if the pointer (DetectLuaData) passed to it is valid. So, the checks for NULL in the call sites can safely be removed. --- src/detect-lua.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/detect-lua.c b/src/detect-lua.c index 1700ab16de..07aaed2d62 100644 --- a/src/detect-lua.c +++ b/src/detect-lua.c @@ -482,8 +482,7 @@ static DetectLuaData *DetectLuaParse (DetectEngineCtx *de_ctx, const char *str) return lua; error: - if (lua != NULL) - DetectLuaFree(de_ctx, lua); + DetectLuaFree(de_ctx, lua); return NULL; }