forked from enlightenment/efl
eio: avoid access after death of eio handler due to inotify triggering IN_IGNORED event.
This commit is contained in:
parent
bf369ba661
commit
e93d6f90db
|
@ -141,6 +141,9 @@ _eio_inotify_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh)
|
|||
if ((event_size + i) > size) break ;
|
||||
i += event_size;
|
||||
|
||||
// No need to waste time looking up for just destroyed handler
|
||||
if ((event->mask & IN_IGNORED)) continue ;
|
||||
|
||||
backend = eina_hash_find(_inotify_monitors, &event->wd);
|
||||
if (!backend) continue ;
|
||||
if (!backend->parent) continue ;
|
||||
|
@ -268,6 +271,8 @@ void eio_monitor_backend_del(Eio_Monitor *monitor)
|
|||
monitor->backend = NULL;
|
||||
if (!backend) return;
|
||||
|
||||
backend->parent = NULL;
|
||||
|
||||
eina_hash_del(_inotify_monitors, &backend->hwnd, backend);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue