aboutsummaryrefslogtreecommitdiff
path: root/seatd/client.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-31 22:44:02 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-31 23:13:16 +0200
commit5b8117f3d4ad767e5ddb8e202c938bc2e0174ffb (patch)
tree33192ba1acf09f19ec7b9a35e3e96358ae25741d /seatd/client.c
parentc9ce7c71aa80769033b556d1c486da81c2fda551 (diff)
client: Do not leak idle clients on exit
Diffstat (limited to 'seatd/client.c')
-rw-r--r--seatd/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/seatd/client.c b/seatd/client.c
index d658454..bd46a86 100644
--- a/seatd/client.c
+++ b/seatd/client.c
@@ -138,6 +138,7 @@ static int handle_open_seat(struct client *client) {
return -1;
}
+ linked_list_remove(&client->link);
if (seat_add_client(seat, client) == -1) {
log_errorf("unable to add client to target seat: %s", strerror(errno));
return -1;
@@ -174,6 +175,7 @@ static int handle_close_seat(struct client *client) {
log_error("unable to remove client from seat");
return -1;
}
+ linked_list_insert(&client->server->idle_clients, &client->link);
struct proto_header header = {
.opcode = SERVER_SEAT_CLOSED,