linux/drivers/net/wan
Cong Wang d5c7c745f2 net/wan: fix a double free in x25_asy_open_tty()
When x25_asy_open() fails, it already cleans up by itself,
so its caller doesn't need to free the memory again.

It seems we still have to call x25_asy_free() to clear the SLF_INUSE
bit, so just set these pointers to NULL after kfree().

Reported-and-tested-by: syzbot+5e5e969e525129229052@syzkaller.appspotmail.com
Fixes: 3b780bed31 ("x25_asy: Free x25_asy on x25_asy_open() failure.")
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-30 20:22:48 -08:00
..
lmc Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-05 13:04:31 -07:00
.gitignore
c101.c net: wan: remove redundant include 2018-09-18 20:08:08 -07:00
cosa.c the rest of drivers/*: annotate ->poll() instances 2017-11-28 11:06:58 -05:00
cosa.h
dlci.c net: Fix inconsistent teardown and release of private netdev state. 2017-06-07 15:53:24 -04:00
dscc4.c drivers/net: wan/dscc4: Remove unused timer 2017-10-27 12:09:16 +09:00
farsync.c farsync: remove redundant variable txq_length 2018-07-07 20:49:08 +09:00
farsync.h
fsl_ucc_hdlc.c net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe() 2018-12-27 16:28:20 -08:00
fsl_ucc_hdlc.h net/wan/fsl_ucc_hdlc: hmask 2018-09-03 22:14:41 -07:00
hd64570.c
hd64570.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hd64572.c
hd64572.h
hdlc_cisco.c hdlc: Convert timers to use timer_setup() 2017-10-18 12:39:55 +01:00
hdlc_fr.c hdlc: Convert timers to use timer_setup() 2017-10-18 12:39:55 +01:00
hdlc_ppp.c hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-02-26 14:38:12 -05:00
hdlc_raw_eth.c net: make struct net_device::tx_queue_len unsigned int 2017-05-18 10:19:30 -04:00
hdlc_raw.c
hdlc_x25.c
hdlc.c
hostess_sv11.c
ixp4xx_hss.c
Kconfig
lapbether.c net: lapbether: fix double free 2017-11-01 12:11:02 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2.c
pc300too.c
pci200syn.c net: wan: remove redundant include 2018-09-18 20:08:08 -07:00
sbni.c drivers/net: wan/sbni: Convert timers to use timer_setup() 2017-10-25 13:20:30 +09:00
sbni.h
sdla.c drivers/net: wan/sdla: Convert timers to use timer_setup() 2017-10-27 12:09:16 +09:00
sealevel.c
slic_ds26522.c
slic_ds26522.h
wanxl.c wan: wanxl: remove redundant assignment to stat 2017-11-02 15:48:16 +09:00
wanxl.h
wanxlfw.inc_shipped
wanxlfw.S
x25_asy.c net/wan: fix a double free in x25_asy_open_tty() 2018-12-30 20:22:48 -08:00
x25_asy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
z85230.c drivers/net/wan/z85230.c: Use designated initializers 2017-08-01 17:04:38 -07:00
z85230.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00