diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-28 13:55:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-09-28 13:55:55 +0100 |
commit | 9a72b1c0335aafab334e7d43463db19c24057142 (patch) | |
tree | ce21cacc134dd139283f2196db4666fac086b0e8 | |
parent | d43599b84174d1a7889cf4d73c7b0cb645f9b31a (diff) | |
download | rspamd-9a72b1c0335aafab334e7d43463db19c24057142.tar.gz rspamd-9a72b1c0335aafab334e7d43463db19c24057142.zip |
[Minor] Fix dns errors reporting
-rw-r--r-- | src/lua/lua_dns_resolver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c index 7c224243e..061503f2d 100644 --- a/src/lua/lua_dns_resolver.c +++ b/src/lua/lua_dns_resolver.c @@ -185,8 +185,12 @@ lua_dns_resolver_callback (struct rdns_reply *reply, gpointer arg) lua_pushboolean (L, reply->authenticated); if (lua_pcall (L, 6, 0, err_idx) != 0) { - msg_info_pool_check ("call to dns callback failed: %s", tb->str); - g_string_free (tb, TRUE); + tb = lua_touserdata (L, -1); + + if (tb) { + msg_info_pool_check ("call to dns callback failed: %s", tb->str); + g_string_free (tb, TRUE); + } } lua_settop (L, err_idx - 1); |