Ver Fonte

TTY: fix fail path in tty_open

When tty_add_file fails we omit to clean up. Fix that by calling
tty_release appropriatelly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jiri Slaby há 14 anos atrás
pai
commit
0259894c73
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      drivers/tty/tty_io.c

+ 1 - 0
drivers/tty/tty_io.c

@@ -1894,6 +1894,7 @@ got_driver:
 	retval = tty_add_file(tty, filp);
 	if (retval) {
 		tty_unlock();
+		tty_release(inode, filp);
 		return retval;
 	}