diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-02 13:37:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-02 13:37:29 +0100 |
commit | df2c48232b78b20ad7834efa80a7b30a41597eeb (patch) | |
tree | 026b89b4656ed009269a5cad8eeb68da6d76a2ed | |
parent | d6f8ba8d1efd06158ed9d9a678528e4be6690b2e (diff) | |
download | rspamd-df2c48232b78b20ad7834efa80a7b30a41597eeb.tar.gz rspamd-df2c48232b78b20ad7834efa80a7b30a41597eeb.zip |
[Minor] Check for NULL first for sanity
-rw-r--r-- | src/lua/lua_http.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |