uxser: add a missing uxsel_del.

If we close a serial port fd, we shouldn't leave it active in uxsel.
That never ends well.

(cherry picked from commit 6b77fc627a)
This commit is contained in:
Simon Tatham 2020-03-13 22:48:15 +00:00
Родитель fade8e81bf
Коммит fee2e42be6
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -333,6 +333,7 @@ static const char *serial_init(Seat *seat, Backend **backend_handle,
static void serial_close(Serial *serial)
{
if (serial->fd >= 0) {
uxsel_del(serial->fd);
close(serial->fd);
serial->fd = -1;
}