commit 0d916d0: [Minor] Do not crash if redis cache cannot be reached
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Oct 22 17:00:08 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-10-22 17:58:10 +0100
URL: https://github.com/rspamd/rspamd/commit/0d916d0c7a636fcd72d80f73193d8543a1e6dcd3 (HEAD -> master)
[Minor] Do not crash if redis cache cannot be reached
---
src/libstat/learn_cache/redis_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
More information about the Commits
mailing list