From c7f9f2eef1fa344f6dadd09c9c3eaa7203b7ca92 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 18 Oct 2017 17:11:36 -0400 Subject: [PATCH] efl_wl: destroy extant shell surface upon surface deletion avoid invalid reads later @fix --- src/lib/efl_wl/efl_wl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c index 2bdb222..9eec04e 100644 --- a/src/lib/efl_wl/efl_wl.c +++ b/src/lib/efl_wl/efl_wl.c @@ -2301,6 +2301,12 @@ comp_surface_smart_del(Evas_Object *obj) } evas_object_del(cs->img); evas_object_del(cs->clip); + if (cs->shell.surface) + { + if (cs->role) + wl_resource_destroy(cs->role); + wl_resource_destroy(cs->shell.surface); + } cs->c->surfaces = eina_inlist_remove(cs->c->surfaces, EINA_INLIST_GET(cs)); cs->c->surfaces_count--; free(cs); -- 2.7.4