event: remove recursive deletion
commit5c2c82edb99c51ea8d882c289007cc4bef874df7
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 16 May 2017 20:03:03 +0000 (16 23:03 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 16 May 2017 20:03:03 +0000 (16 23:03 +0300)
tree3b3bfbbf875535dc317a946ec933170205e19312
parent5e407d5f93b187da57201fb4dde7468b128af16f
event: remove recursive deletion

In theory, vlc_event_detach() can be called from within the event
handler. In practice, callers of vlc_event_detach() expect that the
event handler is not pending after the function returns. This would not
work if recursion actually occurred, it would lead to use-after-free.

This removes recursion, including memory allocation, copying and missing
error handling in event sending.
include/vlc_events.h
src/misc/events.c