uvt: client: fix double-kill by first unlinkink then resetting

We _must_ unlink the client and cdev first, then reset the VT. Otherwise,
the set_vt() call might think we are still alive and call user-defined
callbacks which might call kill again.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2013-03-05 18:00:50 +01:00
parent a9219924c8
commit fdf1321fc7

View File

@ -405,10 +405,10 @@ void uvt_client_kill(struct uvt_client *client)
client->ph = NULL;
}
uvt_client_set_vt(client, NULL, NULL);
uvt_client_waiters_release(client, -EPIPE);
shl_dlist_unlink(&client->list);
client->cdev = NULL;
uvt_client_set_vt(client, NULL, NULL);
uvt_client_waiters_release(client, -EPIPE);
}
/*