diff options
| author | 2022-10-25 21:00:11 +0800 | |
|---|---|---|
| committer | 2022-10-27 12:51:41 +0200 | |
| commit | 0e7ce23a917a9cc83ca3c779fbba836bca3bcf1e (patch) | |
| tree | 043858014fd6dbf88f50de2909a038dbcd102d44 /include/linux/phy/git:/ssh:/git@git.zx2c4.com | |
| parent | Merge branch 'openvswitch-syzbot-splat-fix-and-introduce-selftest' (diff) | |
| download | linux-dev-0e7ce23a917a9cc83ca3c779fbba836bca3bcf1e.tar.xz linux-dev-0e7ce23a917a9cc83ca3c779fbba836bca3bcf1e.zip | |
net: ehea: fix possible memory leak in ehea_register_port()
If of_device_register() returns error, the of node and the
name allocated in dev_set_name() is leaked, call put_device()
to give up the reference that was set in device_initialize(),
so that of node is put in logical_port_release() and the name
is freed in kobject_cleanup().
Fixes: 1acf2318dd13 ("ehea: dynamic add / remove port")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221025130011.1071357-1-yangyingliang@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/phy/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
