summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-10-02 18:36:09 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-10-02 18:36:09 +0100
commitc3aee1e131443db0f246f91c2fa3491dec5a083a (patch)
treea18d67e4672ce1ae242f47d5fb56fbaf7ca8e9ca
parent2b32d54c95c78593463549b9dff79e83bfe727c6 (diff)
downloadrspamd-c3aee1e131443db0f246f91c2fa3491dec5a083a.tar.gz
rspamd-c3aee1e131443db0f246f91c2fa3491dec5a083a.zip
[Minor] Fixed argument check
ev_base should be passed into lua_http.request(). It comes either from task or explicitly
-rw-r--r--src/lua/lua_http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c
index 96872108c..474021485 100644
--- a/src/lua/lua_http.c
+++ b/src/lua/lua_http.c
@@ -854,6 +854,9 @@ lua_http_request (lua_State *L)
if (task == NULL && cfg == NULL) {
return luaL_error (L, "Bad params to rspamd_http:request(): either task or config should be set");
}
+ if (ev_base == NULL) {
+ return luaL_error (L, "Bad params to rspamd_http:request(): ev_base isn't passed");
+ }
cbd = g_malloc0 (sizeof (*cbd));
cbd->cbref = cbref;