aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mimepart.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-25 13:01:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-25 13:01:23 +0100
commitb36eaf826c1f9e587f189c5e9c58966c726a95c9 (patch)
tree4854cbfc8bf3d5d009e8e8b179f2562f41b82cc1 /src/lua/lua_mimepart.c
parentcf071c74aa8e7d2975b08a1271902401890c41f7 (diff)
downloadrspamd-b36eaf826c1f9e587f189c5e9c58966c726a95c9.tar.gz
rspamd-b36eaf826c1f9e587f189c5e9c58966c726a95c9.zip
[Minor] Rework to fix issues in Lua API
Found by: coverity scan
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r--src/lua/lua_mimepart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
index 21a46d496..2018819e8 100644
--- a/src/lua/lua_mimepart.c
+++ b/src/lua/lua_mimepart.c
@@ -2031,8 +2031,8 @@ lua_mimepart_headers_foreach (lua_State *L)
lua_gettable (L, 3);
if (lua_isuserdata (L, -1)) {
- re = *(struct rspamd_lua_regexp **)
- rspamd_lua_check_udata (L, -1, "rspamd{regexp}");
+ RSPAMD_LUA_CHECK_UDATA_PTR_OR_RETURN(L, -1, "rspamd{regexp}",
+ struct rspamd_lua_regexp, re);
}
lua_pop (L, 1);