From: Vsevolod Stakhov Date: Fri, 28 Sep 2018 12:55:20 +0000 (+0100) Subject: [Minor] Fix dns errors reporting X-Git-Tag: 1.8.1~140 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a72b1c0335aafab334e7d43463db19c24057142;p=thirdparty%2Frspamd.git [Minor] Fix dns errors reporting --- diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c index 7c224243e9..061503f2d1 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);