mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
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:
parent
5ba8ab76e9
commit
d3d999a116
2
event.c
2
event.c
@ -721,7 +721,9 @@ event_base_cancel_single_callback_(struct event_base *base,
|
|||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
|
||||||
event_callback_cancel_nolock_(base, evcb, 1);
|
event_callback_cancel_nolock_(base, evcb, 1);
|
||||||
|
EVBASE_RELEASE_LOCK(base, th_base_lock);
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user