derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=120063ad76eac855ef87d87bba0fd82ba665d68f
commit 120063ad76eac855ef87d87bba0fd82ba665d68f Author: Derek Foreman <der...@osg.samsung.com> Date: Wed Jan 4 11:40:17 2017 -0600 ecore_wl2: Prevent use after free on input deletion Window structs keep inputs around, so we should sweep through them and NULL out any stale ones on a delete. --- src/lib/ecore_wl2/ecore_wl2_input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index c2fbe48..3e7fd98 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -1443,6 +1443,7 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input) Ecore_Wl2_Display *display; Eina_Inlist *l = NULL; Ecore_Wl2_Mouse_Down_Info *info = NULL; + Ecore_Wl2_Window *window; if (!input) return; @@ -1490,6 +1491,9 @@ _ecore_wl2_input_del(Ecore_Wl2_Input *input) display->inputs = eina_inlist_remove(display->inputs, EINA_INLIST_GET(input)); + EINA_INLIST_FOREACH(display->windows, window) + if (window->input == input) window->input = NULL; + free(input); } --