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);
}
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);