diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-18 16:40:32 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-18 16:40:32 +0000 |
commit | 5472d282afa9079b718d317fb9e97ccd0fd8e382 (patch) | |
tree | 28e36a07f462c3191d1812a329e015117a9be609 /src/libserver | |
parent | 2167fd58aaca69878ea5e28521540e5d104ad107 (diff) | |
download | rspamd-5472d282afa9079b718d317fb9e97ccd0fd8e382.tar.gz rspamd-5472d282afa9079b718d317fb9e97ccd0fd8e382.zip |
[Fix] Do not crash on redis errors
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/redis_pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libserver/redis_pool.c b/src/libserver/redis_pool.c index 0fe129446..0a692478a 100644 --- a/src/libserver/redis_pool.c +++ b/src/libserver/redis_pool.c @@ -351,6 +351,10 @@ rspamd_redis_pool_connect (struct rspamd_redis_pool *pool, db, password, ip, port); } + if (!conn) { + return NULL; + } + REF_RETAIN (conn); return conn->ctx; |