From 3c5f720c6fc92907c35ed26f10c0998e3c320d82 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 30 Apr 2016 13:18:06 +0100 Subject: [PATCH] authd_check: don't try to update bl_stats if it doesn't exist This can happen if all the blacklists are removed and then authd sends a blacklisted response for a client. --- ircd/s_user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ircd/s_user.c b/ircd/s_user.c index 18104c6a..39c207ae 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -218,8 +218,9 @@ authd_check(struct Client *client_p, struct Client *source_p) struct BlacklistStats *stats; char *blacklist = source_p->preClient->auth.data; - if((stats = rb_dictionary_retrieve(bl_stats, blacklist)) != NULL) - stats->hits++; + if(bl_stats != NULL) + if((stats = rb_dictionary_retrieve(bl_stats, blacklist)) != NULL) + stats->hits++; if(IsExemptKline(source_p) || IsConfExemptDNSBL(aconf)) {