diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-02-27 21:44:31 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-02-27 21:46:38 +0100 |
commit | e173691cfd0fd06baec924f5df90eb1e9f4e8fb5 (patch) | |
tree | e43d3d0932d057ef57a2cbf2e9f9da709e3554db /seatd | |
parent | cedd64c283794c5b6593f308cddde2cdab7c2bcf (diff) |
seatd: Close cur_ttyfd in seat_destroy
This fd would only still be set after closing clients if no clients were
active on the current VT.
Diffstat (limited to 'seatd')
-rw-r--r-- | seatd/seat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/seatd/seat.c b/seatd/seat.c index c34cfe1..c737979 100644 --- a/seatd/seat.c +++ b/seatd/seat.c @@ -19,6 +19,8 @@ #include "terminal.h" static int seat_close_client(struct client *client); +static void vt_close(struct seat *seat); + struct seat *seat_create(const char *seat_name, bool vt_bound) { struct seat *seat = calloc(1, sizeof(struct seat)); @@ -49,7 +51,7 @@ void seat_destroy(struct seat *seat) { assert(client->seat == seat); client_destroy(client); } - assert(seat->cur_ttyfd == -1); + vt_close(seat); linked_list_remove(&seat->link); free(seat->seat_name); free(seat); |