hmi-controller: add missing removals of surface listeners
The surface listeners must remove when hmi-controller destroying. To avoid to use after free. Suggested-by: Marius Vlad <marius.vlad@collabora.com> Signed-off-by: Tran Ba Khang(MS/EMC31-XC) <Khang.TranBa@vn.bosch.com>
This commit is contained in:
parent
dea53c33ea
commit
9fa161ed09
|
@ -758,6 +758,10 @@ hmi_controller_destroy(struct wl_listener *listener, void *data)
|
|||
free(ctrl_layer_link);
|
||||
}
|
||||
|
||||
wl_list_remove(&hmi_ctrl->surface_removed.link);
|
||||
wl_list_remove(&hmi_ctrl->surface_configured.link);
|
||||
wl_list_remove(&hmi_ctrl->desktop_surface_configured.link);
|
||||
|
||||
wl_array_release(&hmi_ctrl->ui_widgets);
|
||||
free(hmi_ctrl->hmi_setting);
|
||||
free(hmi_ctrl);
|
||||
|
|
Loading…
Reference in New Issue