aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-12-04 18:20:46 -0500
committerGitHub <noreply@github.com>2018-12-04 18:20:46 -0500
commitfdb67ff63bdb301ee202a128c0b8cb616736707d (patch)
tree7443c06ed941c39a97270747ee81329c27a7b32c
parentbf66e299730540331e521a4d923f763ec9108cab (diff)
parent3ca7ca5306df09abd7809e69fb7e1a9817fcf527 (diff)
Merge pull request #1415 from emersion/tablet-seat-leak
tablet-v2: fix wlr_tablet_seat_v2 leak
-rw-r--r--types/tablet_v2/wlr_tablet_v2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/types/tablet_v2/wlr_tablet_v2.c b/types/tablet_v2/wlr_tablet_v2.c
index a1cace93..d0bc799d 100644
--- a/types/tablet_v2/wlr_tablet_v2.c
+++ b/types/tablet_v2/wlr_tablet_v2.c
@@ -28,13 +28,14 @@ struct wlr_tablet_manager_client_v2 {
};
static void tablet_seat_destroy(struct wlr_tablet_seat_v2 *seat) {
- wl_list_remove(&seat->link);
- wl_list_remove(&seat->seat_destroy.link);
-
struct wlr_tablet_seat_client_v2 *client, *client_tmp;
wl_list_for_each_safe(client, client_tmp, &seat->clients, seat_link) {
tablet_seat_client_v2_destroy(client->resource);
}
+
+ wl_list_remove(&seat->link);
+ wl_list_remove(&seat->seat_destroy.link);
+ free(seat);
}
static void handle_wlr_seat_destroy(struct wl_listener *listener, void *data) {