aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_tcp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-09 18:02:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-06-09 18:02:29 +0100
commita34711685b3d17a1e3ec9f3d5069096522ba2a35 (patch)
treef7a11a759f5e6a190a1db14f1fc6486de4cb5576 /src/lua/lua_tcp.c
parent3a3f36fa5ec1d9a08cc0365dcafc5dc5d2cc7d08 (diff)
downloadrspamd-a34711685b3d17a1e3ec9f3d5069096522ba2a35.tar.gz
rspamd-a34711685b3d17a1e3ec9f3d5069096522ba2a35.zip
Check DNS resolver return value.
Diffstat (limited to 'src/lua/lua_tcp.c')
-rw-r--r--src/lua/lua_tcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c
index fadb7d93b..43e8cab7e 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -610,8 +610,11 @@ lua_tcp_request (lua_State *L)
}
}
else {
- make_dns_request (resolver, session, NULL, lua_tcp_dns_handler, cbd,
- RDNS_REQUEST_A, host);
+ if (!make_dns_request (resolver, session, NULL, lua_tcp_dns_handler, cbd,
+ RDNS_REQUEST_A, host)) {
+ lua_tcp_push_error (cbd, "cannot resolve host");
+ lua_tcp_maybe_free (cbd);
+ }
}
lua_pushboolean (L, TRUE);