diff options
| author | 2022-10-31 20:13:40 +0800 | |
|---|---|---|
| committer | 2022-11-02 12:34:48 +0000 | |
| commit | e7d1d4d9ac0dfa40be4c2c8abd0731659869b297 (patch) | |
| tree | a75a419d62c22acad066f6cfad7f3dfe9b0e1377 /tools/scripts/ssh:/git@git.zx2c4.com | |
| parent | rose: Fix NULL pointer dereference in rose_send_frame() (diff) | |
| download | linux-dev-e7d1d4d9ac0dfa40be4c2c8abd0731659869b297.tar.xz linux-dev-e7d1d4d9ac0dfa40be4c2c8abd0731659869b297.zip | |
mISDN: fix possible memory leak in mISDN_register_device()
Afer commit 1fa5ae857bb1 ("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: 1fa5ae857bb1 ("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>
Diffstat (limited to 'tools/scripts/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
