Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 335adde6 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
}