linux/drivers/isdn
Yang Yingliang e7d1d4d9ac mISDN: fix possible memory leak in mISDN_register_device()
Afer commit 1fa5ae857b ("driver core: get rid of struct device's
bus_id string array"), the name of device is allocated dynamically,
add put_device() to give up the reference, so that the name can be
freed in kobject_cleanup() when the refcount is 0.

Set device class before put_device() to avoid null release() function
WARN message in device_release().

Fixes: 1fa5ae857b ("driver core: get rid of struct device's bus_id string array")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-02 12:34:48 +00:00
..
capi isdn: move from strlcpy with unused retval to strscpy 2022-08-22 17:54:03 -07:00
hardware mISDN: hfcpci: Fix use-after-free bug in hfcpci_softirq 2022-10-09 19:11:54 +01:00
mISDN mISDN: fix possible memory leak in mISDN_register_device() 2022-11-02 12:34:48 +00:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile isdn: capi: dead code removal 2019-12-11 09:12:38 +01:00