diff --git a/event.c b/event.c index d2768793..98b1bc4a 100644 --- a/event.c +++ b/event.c @@ -1641,10 +1641,12 @@ event_process_active_single_queue(struct event_base *base, break; case EV_CLOSURE_EVENT: { void (*evcb_callback)(evutil_socket_t, short, void *); + short res; EVUTIL_ASSERT(ev != NULL); evcb_callback = *ev->ev_callback; + res = ev->ev_res; EVBASE_RELEASE_LOCK(base, th_base_lock); - evcb_callback(ev->ev_fd, ev->ev_res, ev->ev_arg); + evcb_callback(ev->ev_fd, res, ev->ev_arg); } break; case EV_CLOSURE_CB_SELF: {