aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_html.cxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-02 14:02:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-02 14:02:16 +0100
commit7c24396600cb624dc874e26c383d54352af4d195 (patch)
treecfd1a0fb2709d2ea2edcfd47e1e2dff52dd98d00 /src/lua/lua_html.cxx
parent936231df29e20e33193adffbddd5aa41f22f9f84 (diff)
downloadrspamd-7c24396600cb624dc874e26c383d54352af4d195.tar.gz
rspamd-7c24396600cb624dc874e26c383d54352af4d195.zip
[Minor] Fix pushing lua_url structure
Diffstat (limited to 'src/lua/lua_html.cxx')
-rw-r--r--src/lua/lua_html.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lua/lua_html.cxx b/src/lua/lua_html.cxx
index 4348d91c0..370f2230e 100644
--- a/src/lua/lua_html.cxx
+++ b/src/lua/lua_html.cxx
@@ -620,7 +620,6 @@ lua_html_tag_get_extra (lua_State *L)
LUA_TRACE_POINT;
struct lua_html_tag *ltag = lua_check_html_tag (L, 1);
struct html_image *img;
- struct rspamd_url **purl;
if (ltag) {
if (!std::holds_alternative<std::monostate>(ltag->tag->extra)) {
@@ -630,8 +629,8 @@ lua_html_tag_get_extra (lua_State *L)
}
else if (std::holds_alternative<struct rspamd_url *>(ltag->tag->extra)) {
/* For A that's URL */
- purl = static_cast<rspamd_url **>(lua_newuserdata(L, sizeof(gpointer)));
- *purl = std::get<struct rspamd_url *>(ltag->tag->extra);
+ auto *lua_url = static_cast<rspamd_lua_url *>(lua_newuserdata(L, sizeof(rspamd_lua_url)));
+ lua_url->url = std::get<struct rspamd_url *>(ltag->tag->extra);
rspamd_lua_setclass (L, "rspamd{url}", -1);
}
else {