Missed lock acquire/release in event_base_cancel_single_callback_()

Call backtrace:
...
event_queue_remove_active()
event_callback_cancel_nolock_()
event_base_cancel_single_callback_()
event_base_free_()
event_base_free()
...

Fix for e9ebef83
This commit is contained in:
Azat Khuzhin 2013-05-10 20:22:56 +04:00 committed by Nick Mathewson
parent 5ba8ab76e9
commit d3d999a116

View File

@ -721,7 +721,9 @@ event_base_cancel_single_callback_(struct event_base *base,
result = 1;
}
} else {
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
event_callback_cancel_nolock_(base, evcb, 1);
EVBASE_RELEASE_LOCK(base, th_base_lock);
result = 1;
}