From: Rob Bradford <[email protected]>

The code under the "err" label closes the file descriptor and frees the
allocated memory.
---
 src/tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tty.c b/src/tty.c
index 6d58aa5..05e5e20 100644
--- 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;
                }
        }
 
-- 
1.7.11.7

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to