projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef94085
)
tty: Clean up completely if switching vt fails
author
Rob Bradford
<rob@linux.intel.com>
Wed, 5 Dec 2012 18:47:08 +0000
(18:47 +0000)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 7 Dec 2012 03:32:37 +0000
(22:32 -0500)
The code under the "err" label closes the file descriptor and frees the
allocated memory.
src/tty.c
patch
|
blob
|
history
diff --git
a/src/tty.c
b/src/tty.c
index
6d58aa5
..
05e5e20
100644
(file)
--- a/
src/tty.c
+++ b/
src/tty.c
@@
-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
;
}
}