From: Mikhail Galanin Date: Tue, 2 Oct 2018 17:36:09 +0000 (+0100) Subject: [Minor] Fixed argument check X-Git-Tag: 1.8.1~101^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c3aee1e131443db0f246f91c2fa3491dec5a083a;p=rspamd.git [Minor] Fixed argument check ev_base should be passed into lua_http.request(). It comes either from task or explicitly --- 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;