aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-24 10:30:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-24 10:30:38 +0100
commit01844357a361a1af0ab2b359024fd2555e0f10b9 (patch)
tree37c818479969857377a76e135c74523aed58d3dc /src/lua
parent8cc6b5815a7a3b2c08f3e1c837e86386997b9cde (diff)
downloadrspamd-01844357a361a1af0ab2b359024fd2555e0f10b9.tar.gz
rspamd-01844357a361a1af0ab2b359024fd2555e0f10b9.zip
[Minor] Fix dns resolve with no current item
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_dns_resolver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c
index 8a49fdfaf..d00aaa6a2 100644
--- a/src/lua/lua_dns_resolver.c
+++ b/src/lua/lua_dns_resolver.c
@@ -455,7 +455,10 @@ lua_dns_resolver_resolve_common (lua_State *L,
if (ret) {
cbdata->s = session;
cbdata->item = rspamd_symbols_cache_get_cur_item (task);
- rspamd_symcache_item_async_inc (task, cbdata->item);
+
+ if (cbdata->item) {
+ rspamd_symcache_item_async_inc (task, cbdata->item);
+ }
/* callback was set up */
lua_pushboolean (L, TRUE);
} else {