Merge pull request #379 from martinetd/shutdown_asan

Shutdown ASAN fixes
This commit is contained in:
Drew DeVault 2017-11-01 16:28:08 -04:00 committed by GitHub
commit 63a46c6550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -105,6 +105,7 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *_backend) {
wl_signal_emit(&backend->backend.events.input_remove, wlr_dev);
wlr_input_device_destroy(wlr_dev);
}
free(wlr_devices);
}
wlr_list_free(backend->wlr_device_lists);
wl_event_source_remove(backend->input_event);

View File

@ -30,8 +30,8 @@ static bool multi_backend_start(struct wlr_backend *_backend) {
static void multi_backend_destroy(struct wlr_backend *_backend) {
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend;
struct subbackend_state *sub;
wl_list_for_each(sub, &backend->backends, link) {
struct subbackend_state *sub, *next;
wl_list_for_each_safe(sub, next, &backend->backends, link) {
wlr_backend_destroy(sub->backend);
free(sub);
}