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>
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);
}
/*