diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-13 17:45:39 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-13 17:45:39 +0100 |
commit | 3b780bed3138c2a8061c218df7e321beec9a6ec9 (patch) | |
tree | 79ff5bf9dfe28de9c9231a6db768d045599a488a /drivers | |
parent | mlxsw: fix SWITCHDEV_OBJ_ID_PORT_MDB (diff) | |
download | linux-3b780bed3138c2a8061c218df7e321beec9a6ec9.tar.xz linux-3b780bed3138c2a8061c218df7e321beec9a6ec9.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/x25_asy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index cd39025d2abf..1bc5e93d2a34 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -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; } |