Fix a warning when building without threading.

This commit is contained in:
Nick Mathewson 2012-11-18 01:40:13 -05:00
parent 9dee36bc8b
commit f2703b2e34

View File

@ -1783,12 +1783,11 @@ static void
event_once_cb(evutil_socket_t fd, short events, void *arg)
{
struct event_once *eonce = arg;
struct event_base *base = eonce->ev.ev_base;
(*eonce->cb)(fd, events, eonce->arg);
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
EVBASE_ACQUIRE_LOCK(eonce->ev.ev_base, th_base_lock);
LIST_REMOVE(eonce, next_once);
EVBASE_RELEASE_LOCK(base, th_base_lock);
EVBASE_RELEASE_LOCK(eonce->ev.ev_base, th_base_lock);
event_debug_unassign(&eonce->ev);
mm_free(eonce);
}