mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge pull request #1228 from arandomhuman/misc-mem
Miscellaneous memory leak fixes
This commit is contained in:
commit
d22431d969
10 changed files with 75 additions and 24 deletions
|
|
@ -283,6 +283,7 @@ void wlr_tablet_v2_destroy(struct wlr_tablet_manager_v2 *manager) {
|
|||
}
|
||||
|
||||
wlr_signal_emit_safe(&manager->events.destroy, manager);
|
||||
wl_list_remove(&manager->display_destroy.link);
|
||||
wl_global_destroy(manager->wl_global);
|
||||
free(manager);
|
||||
}
|
||||
|
|
@ -294,13 +295,6 @@ struct wlr_tablet_manager_v2 *wlr_tablet_v2_create(struct wl_display *display) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
wl_signal_init(&tablet->events.destroy);
|
||||
wl_list_init(&tablet->clients);
|
||||
wl_list_init(&tablet->seats);
|
||||
|
||||
tablet->display_destroy.notify = handle_display_destroy;
|
||||
wl_display_add_destroy_listener(display, &tablet->display_destroy);
|
||||
|
||||
tablet->wl_global = wl_global_create(display,
|
||||
&zwp_tablet_manager_v2_interface, TABLET_MANAGER_VERSION,
|
||||
tablet, tablet_v2_bind);
|
||||
|
|
@ -309,5 +303,12 @@ struct wlr_tablet_manager_v2 *wlr_tablet_v2_create(struct wl_display *display) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
wl_signal_init(&tablet->events.destroy);
|
||||
wl_list_init(&tablet->clients);
|
||||
wl_list_init(&tablet->seats);
|
||||
|
||||
tablet->display_destroy.notify = handle_display_destroy;
|
||||
wl_display_add_destroy_listener(display, &tablet->display_destroy);
|
||||
|
||||
return tablet;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue