From: Jason Volk Date: Sat, 25 Jun 2016 02:29:02 +0000 (-0700) Subject: Fix bug. Note: The second hunk is just an assumption. It's not called from anywhere. X-Git-Url: https://jfr.im/git/solanum.git/commitdiff_plain/12de082e2cb6d8a228deafeb57e3a4964fe87cdd Fix bug. Note: The second hunk is just an assumption. It's not called from anywhere. --- 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);