diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-22 17:58:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-22 17:58:10 +0100 |
commit | 0d916d0c7a636fcd72d80f73193d8543a1e6dcd3 (patch) | |
tree | 74eeb80b5b4621298a065b68704c535f1d21f960 /src/libstat | |
parent | 9682b43caca49136bb18a3212b8defe2691b09ca (diff) | |
download | rspamd-0d916d0c7a636fcd72d80f73193d8543a1e6dcd3.tar.gz rspamd-0d916d0c7a636fcd72d80f73193d8543a1e6dcd3.zip |
[Minor] Do not crash if redis cache cannot be reached
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/learn_cache/redis_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/learn_cache/redis_cache.c b/src/libstat/learn_cache/redis_cache.c index a76ad585c..0df3783ab 100644 --- a/src/libstat/learn_cache/redis_cache.c +++ b/src/libstat/learn_cache/redis_cache.c @@ -470,7 +470,7 @@ rspamd_stat_cache_redis_learn (struct rspamd_task *task, gchar *h; gint flag; - if (rspamd_session_blocked (task->s)) { + if (rt == NULL || rt->ctx == NULL || rspamd_session_blocked (task->s)) { return RSPAMD_LEARN_INGORE; } |