mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 11:58:03 +02:00
tty: Clean up completely if switching vt fails
The code under the "err" label closes the file descriptor and frees the allocated memory.
This commit is contained in:
parent
8104ec5dd5
commit
b28d8edb65
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ tty_create(struct weston_compositor *compositor, tty_vt_func_t vt_func,
|
|||
if (ioctl(tty->fd, VT_ACTIVATE, tty->vt) < 0 ||
|
||||
ioctl(tty->fd, VT_WAITACTIVE, tty->vt) < 0) {
|
||||
weston_log("failed to swtich to new vt\n");
|
||||
return NULL;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue