diff options
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r-- | src/lua/lua_task.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index c0b299fb7..d28d897f6 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -468,6 +468,7 @@ lua_dns_callback (struct rspamd_dns_reply *reply, gpointer arg) union rspamd_reply_element *elt; GList *cur; + g_mutex_lock (lua_mtx); if (cd->cb_is_ref) { lua_rawgeti (cd->L, LUA_REGISTRYINDEX, cd->callback.ref); } @@ -553,6 +554,7 @@ lua_dns_callback (struct rspamd_dns_reply *reply, gpointer arg) if (cd->cb_is_ref) { luaL_unref (cd->L, LUA_REGISTRYINDEX, cd->callback.ref); } + g_mutex_unlock (lua_mtx); } static gint |