From df2c48232b78b20ad7834efa80a7b30a41597eeb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 2 Jul 2022 13:37:29 +0100 Subject: [Minor] Check for NULL first for sanity --- src/lua/lua_http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index c4dffa8f7..d7f8c74f4 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -1062,7 +1062,10 @@ lua_http_request (lua_State *L) cbd->url = url; cbd->auth = auth; cbd->task = task; - cbd->up = rspamd_upstream_ref(up); + + if (up) { + cbd->up = rspamd_upstream_ref(up); + } if (cbd->cbref == -1) { cbd->thread = lua_thread_pool_get_running_entry (cfg->lua_thread_pool); -- cgit v1.2.3