diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2023-11-23 17:52:37 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2023-11-30 14:57:00 +0300 |
commit | c72b9c33ef9695ad7ce7a6eb39a9df8a01b70796 (patch) | |
tree | e8c389dd696f0d9cd4e479520fa13cf708969e54 /drivers | |
parent | 1e5caee2ba8f1426e8098afb4ca38dc40a0ca71b (diff) | |
download | linux-c72b9c33ef9695ad7ce7a6eb39a9df8a01b70796.tar.xz |
ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
kasprintf() returns a pointer to dynamically allocated memory which can
be NULL upon failure. When 'soc_dev_attr->family' is NULL,it'll trigger
the null pointer dereference issue, such as in 'soc_info_show'.
And when 'soc_device_register' fails, it's necessary to release
'soc_dev_attr->family' to avoid memory leaks.
Fixes: 6770b2114325 ("ARM: OMAP2+: Export SoC information to userspace")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Message-ID: <20231123145237.609442-1-chentao@kylinos.cn>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions