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.
pull/14262/head
Shivani Bhardwaj 9 months ago committed by Victor Julien
parent 71339c459e
commit a23add0194

@ -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;
}

Loading…
Cancel
Save