From b84e58f90558c3b3134e749bbbbb597bdc359e8c Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 23 Feb 2014 23:46:57 +0100 Subject: [PATCH] Fix use after free. --- src/blacklist.c | 2 +- src/newconf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blacklist.c b/src/blacklist.c index ef8a1d1c..58dabfb4 100644 --- a/src/blacklist.c +++ b/src/blacklist.c @@ -267,8 +267,8 @@ void unref_blacklist(struct Blacklist *blptr) { RB_DLINK_FOREACH_SAFE(ptr, next_ptr, blptr->filters.head) { - rb_free(ptr); rb_dlinkDelete(ptr, &blptr->filters); + rb_free(ptr); } rb_dlinkFindDestroy(blptr, &blacklist_list); diff --git a/src/newconf.c b/src/newconf.c index 9dd9eff2..2ff8c1ef 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -1946,8 +1946,8 @@ cleanup_bl: { RB_DLINK_FOREACH_SAFE(ptr, nptr, yy_blacklist_filters.head) { - rb_free(ptr); rb_dlinkDelete(ptr, &yy_blacklist_filters); + rb_free(ptr); } } else