From 69b5c647045bcbdbd9bb8e79ff79ba8dcd9ff36a Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 6 Aug 2013 19:08:42 -0400 Subject: [PATCH] Move event_debug_note_teardown_ before mm_free. This isn't a bug, since only the pointer value of ev was used, but it's probably best not to tempt fate. Found by coverity. --- event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event.c b/event.c index d3ebb14c..010d9132 100644 --- a/event.c +++ b/event.c @@ -1542,9 +1542,9 @@ event_process_active_single_queue(struct event_base *base, EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING)); EVBASE_RELEASE_LOCK(base, th_base_lock); ev->ev_evcallback.evcb_cb_union.evcb_evfinalize(ev, ev->ev_arg); + event_debug_note_teardown_(ev); if (evcb->evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE) mm_free(ev); - event_debug_note_teardown_(ev); break; case EV_CLOSURE_CB_FINALIZE: base->current_event = NULL; -- 2.40.0