summaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-09 21:13:46 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-27 14:28:20 -0800
commitc8b710b3e4348119924051551b836c94835331b1 (patch)
tree5315047eaf79a1e2db862ab4502569b42b2b9136 /include/linux/tty.h
parentf4f9edcf9b5289ed96113e79fa65a7bf27ecb096 (diff)
downloadop-kernel-dev-c8b710b3e4348119924051551b836c94835331b1.zip
op-kernel-dev-c8b710b3e4348119924051551b836c94835331b1.tar.gz
tty: Fix ldisc leak in failed tty_init_dev()
release_tty() leaks the ldisc instance when called directly (rather than when releasing the file descriptor from tty_release()). Since tty_ldisc_release() clears tty->ldisc, releasing the ldisc instance at tty teardown if tty->ldisc is non-null is not in danger of double-releasing the ldisc. Remove deinitialize_tty_struct() now that free_tty_struct() always performs the tty_ldisc_deinit(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index d9fb4b0..64e301d 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -509,7 +509,6 @@ extern int tty_alloc_file(struct file *file);
extern void tty_add_file(struct tty_struct *tty, struct file *file);
extern void tty_free_file(struct file *file);
extern void free_tty_struct(struct tty_struct *tty);
-extern void deinitialize_tty_struct(struct tty_struct *tty);
extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx);
extern int tty_release(struct inode *inode, struct file *filp);
extern int tty_init_termios(struct tty_struct *tty);
OpenPOWER on IntegriCloud