From c3aee1e131443db0f246f91c2fa3491dec5a083a Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Tue, 2 Oct 2018 18:36:09 +0100 Subject: [PATCH] [Minor] Fixed argument check ev_base should be passed into lua_http.request(). It comes either from task or explicitly --- src/lua/lua_http.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5