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

Commit 3b780bed authored by David S. Miller's avatar David S. Miller
Browse files

x25_asy: Free x25_asy on x25_asy_open() failure.



Based upon a report by Dmitry Vyukov.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00ae40e7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -571,8 +571,10 @@ static int x25_asy_open_tty(struct tty_struct *tty)

	/* Perform the low-level X.25 async init */
	err = x25_asy_open(sl->dev);
	if (err)
	if (err) {
		x25_asy_free(sl);
		return err;
	}
	/* Done.  We have linked the TTY line to a channel. */
	return 0;
}