diff options
-rw-r--r-- | ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c index dc2f4b7..0a4cf25 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -632,6 +632,7 @@ controller_surface_listener_destroyed(void *data, struct ivi_controller_surface *controller) { struct surface_context *ctx_surf = data; + struct accepted_seat *seat, *seat_next; if (ctx_surf->notification != NULL) { ctx_surf->notification(ctx_surf->id_surface, @@ -647,6 +648,12 @@ controller_surface_listener_destroyed(void *data, ivi_controller_surface_destroy(controller, 1); + wl_list_for_each_safe(seat, seat_next, &ctx_surf->list_accepted_seats, link) { + wl_list_remove(&seat->link); + free(seat->seat_name); + free(seat); + } + wl_list_remove(&ctx_surf->order.link); wl_list_remove(&ctx_surf->link); free(ctx_surf); @@ -1050,7 +1057,14 @@ static void destroy_control_resources(void) { struct surface_context *l; struct surface_context *n; + struct accepted_seat *seat, *seat_next; wl_list_for_each_safe(l, n, &ctx->wl.list_surface, link) { + wl_list_for_each_safe(seat, seat_next, &l->list_accepted_seats, link) { + wl_list_remove(&seat->link); + free(seat->seat_name); + free(seat); + } + wl_list_remove(&l->link); wl_list_remove(&l->order.link); ivi_controller_surface_destroy(l->controller, 0); |