]> jfr.im git - solanum.git/commitdiff
Fix bug. Note: The second hunk is just an assumption. It's not called from anywhere.
authorJason Volk <redacted>
Sat, 25 Jun 2016 02:29:02 +0000 (19:29 -0700)
committerWilliam Pitcock <redacted>
Sat, 25 Jun 2016 19:27:32 +0000 (14:27 -0500)
ircd/authproc.c

index b7e8be36ddf19dd05ff87ed59290cd36f3daaf9a..00fec3e0d1def6d0110da2388a431eb31370373b 100644 (file)
@@ -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);