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.
master
Dan Robertson 7 years ago
parent 9dc868a27f
commit 99e6cba3c3
No known key found for this signature in database
GPG Key ID: 45C4A652C47E42A5

@ -118,7 +118,9 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *wlr_backend) {
wl_list_remove(&backend->session_signal.link);
wlr_list_finish(&backend->wlr_device_lists);
wl_event_source_remove(backend->input_event);
if (backend->input_event) {
wl_event_source_remove(backend->input_event);
}
libinput_unref(backend->libinput_context);
free(backend);
}

Loading…
Cancel
Save