提交 335adde6 编写于 作者: A Alan Cox 提交者: Linus Torvalds

pty: Fix allocation failure double free

The updating and moving around of the pty code added a bug where both the
helper and caller free the main tty struct (the pty driver must free the
o_tty pair itself however).
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fe9cd962
......@@ -544,8 +544,6 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
module_put(o_tty->driver->owner);
free_tty_struct(o_tty);
pty_unix98_shutdown(tty);
free_tty_struct(tty);
module_put(driver->owner);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册