From 12de082e2cb6d8a228deafeb57e3a4964fe87cdd Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 24 Jun 2016 19:29:02 -0700 Subject: [PATCH] Fix bug. Note: The second hunk is just an assumption. It's not called from anywhere. --- ircd/authproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircd/authproc.c b/ircd/authproc.c index b7e8be36..00fec3e0 100644 --- a/ircd/authproc.c +++ b/ircd/authproc.c @@ -615,7 +615,7 @@ add_blacklist(const char *host, const char *reason, uint8_t iptype, rb_dlink_lis stats->host = rb_strdup(host); stats->iptype = iptype; stats->hits = 0; - rb_dictionary_add(bl_stats, host, stats); + rb_dictionary_add(bl_stats, stats->host, stats); rb_helper_write(authd_helper, "O rbl %s %hhu %s :%s", host, iptype, filterbuf, reason); } @@ -627,9 +627,9 @@ del_blacklist(const char *host) struct BlacklistStats *stats = rb_dictionary_retrieve(bl_stats, host); if(stats != NULL) { + rb_dictionary_delete(bl_stats, host); rb_free(stats->host); rb_free(stats); - rb_dictionary_delete(bl_stats, host); } rb_helper_write(authd_helper, "O rbl_del %s", host);