Commit 335adde6 authored by Alan Cox's avatar Alan Cox Committed by 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: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment