event-loop: Use two-step destruction of event loop sources.
Instead of directly freeing an event source upon removal put it in a
queue later handled by the event loop; either after a dispatch or upon
event loop destruction.
This is necessary to avoid already queued up event sources to be freed
during some other dispatch callback, causing segmentation faults when
the event loop later tries to handle an event from the freed source.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Loading
Please register or sign in to comment