mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 18:39:48 +01:00
Fix null deref in wlr_libinput_backend_destroy
If input_event is null (e.g. if backend_start has not been called yet) wl_event_source_remove will result in a null deref.
This commit is contained in:
parent
9dc868a27f
commit
99e6cba3c3
1 changed files with 3 additions and 1 deletions
|
@ -118,7 +118,9 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *wlr_backend) {
|
||||||
wl_list_remove(&backend->session_signal.link);
|
wl_list_remove(&backend->session_signal.link);
|
||||||
|
|
||||||
wlr_list_finish(&backend->wlr_device_lists);
|
wlr_list_finish(&backend->wlr_device_lists);
|
||||||
|
if (backend->input_event) {
|
||||||
wl_event_source_remove(backend->input_event);
|
wl_event_source_remove(backend->input_event);
|
||||||
|
}
|
||||||
libinput_unref(backend->libinput_context);
|
libinput_unref(backend->libinput_context);
|
||||||
free(backend);
|
free(backend);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue