From e232f35c63b121493b23b67880f504e57c4beea1 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Sun, 21 Apr 2013 11:10:19 -0500 Subject: [PATCH] Blacklist: fix accidentally clobbering previous filters --- src/newconf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index b5934714e..f698aaa6b 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -1943,12 +1943,17 @@ conf_set_blacklist_reason(void *data) } cleanup_bl: - RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_blacklist_filters.head) + if (data == NULL) { - if (data == NULL) + RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_blacklist_filters.head) + { rb_free(ptr); - - rb_dlinkDelete(ptr, &yy_blacklist_filters); + rb_dlinkDelete(ptr, &yy_blacklist_filters); + } + } + else + { + yy_blacklist_filters = (rb_dlink_list){ NULL, NULL, 0 }; } rb_free(yy_blacklist_host);