diff options
author | Rob Bradford <rob@linux.intel.com> | 2012-12-05 18:47:08 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-12-11 23:47:23 -0500 |
commit | b28d8edb657b37e8a33ef40f261035e27838c9f1 (patch) | |
tree | 6ef9174a02260b04e3e43a474d0c42cc58644c45 | |
parent | 8104ec5dd55071ad30669592f91fe2efc134447d (diff) | |
download | weston-b28d8edb657b37e8a33ef40f261035e27838c9f1.tar.gz |
tty: Clean up completely if switching vt fails
The code under the "err" label closes the file descriptor and frees the
allocated memory.
-rw-r--r-- | src/tty.c | 2 |
1 files changed, 1 insertions, 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; } } |