aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-04 12:47:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-04 12:47:18 +0000
commit536928ff78dac086a0f0b68fed7c4e87d3cf743c (patch)
tree5f7fe4dd422b0ff109b06caf7b9da78806b5c609 /src/libserver
parent93c8d14a6b04ef0325dc62e11ab19156b4ba962b (diff)
downloadrspamd-536928ff78dac086a0f0b68fed7c4e87d3cf743c.tar.gz
rspamd-536928ff78dac086a0f0b68fed7c4e87d3cf743c.zip
[Fix] Fix lua cached elements invalidation
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/task.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c
index 257c3eed6..1124a15d9 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -204,9 +204,9 @@ rspamd_task_free (struct rspamd_task *task)
struct rspamd_mime_part *p;
struct rspamd_mime_text_part *tp;
struct rspamd_email_address *addr;
+ struct rspamd_lua_cached_entry *entry;
GHashTableIter it;
gpointer k, v;
- gint lua_ref;
guint i;
if (task) {
@@ -301,9 +301,9 @@ rspamd_task_free (struct rspamd_task *task)
g_hash_table_iter_init (&it, task->lua_cache);
while (g_hash_table_iter_next (&it, &k, &v)) {
- lua_ref = GPOINTER_TO_INT (v);
+ entry = (struct rspamd_lua_cached_entry *)v;
luaL_unref (task->cfg->lua_state,
- LUA_REGISTRYINDEX, lua_ref);
+ LUA_REGISTRYINDEX, entry->ref);
}
g_hash_table_unref (task->lua_cache);