x25_asy: Free x25_asy on x25_asy_open() failure.
Based upon a report by Dmitry Vyukov. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
00ae40e71d
commit
3b780bed31
1 changed files with 3 additions and 1 deletions
|
@ -571,8 +571,10 @@ static int x25_asy_open_tty(struct tty_struct *tty)
|
||||||
|
|
||||||
/* Perform the low-level X.25 async init */
|
/* Perform the low-level X.25 async init */
|
||||||
err = x25_asy_open(sl->dev);
|
err = x25_asy_open(sl->dev);
|
||||||
if (err)
|
if (err) {
|
||||||
|
x25_asy_free(sl);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
/* Done. We have linked the TTY line to a channel. */
|
/* Done. We have linked the TTY line to a channel. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue