]> granicus.if.org Git - libevent/commit
Always run pending finalizers when event_base_free() is called
authorNick Mathewson <nickm@torproject.org>
Wed, 10 Apr 2013 01:14:52 +0000 (21:14 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Apr 2013 16:18:07 +0000 (12:18 -0400)
commite9ebef83a068ca938887624042461d614070071e
treee013e6c896a3efee5dffefc493a70efa7d289b81
parent02fbf68770d3dcb864c867124e159b3680036206
Always run pending finalizers when event_base_free() is called

There was actually a bug in the original version of this: it tried to
run the finalizers after (potentially) setting current_base to NULL;
but those finalizers could themselves (potentially) be invoking stuff
that needed to know about the current event_base.  So the right time to
do it is _before_ clearing current_base.
event.c
include/event2/event.h