From: Vsevolod Stakhov Date: Sat, 2 Jul 2022 12:37:29 +0000 (+0100) Subject: [Minor] Check for NULL first for sanity X-Git-Tag: 3.3~151 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=df2c48232b78b20ad7834efa80a7b30a41597eeb;p=rspamd.git [Minor] Check for NULL first for sanity --- 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);