linux/arch/arm/mach-omap2
Kunwu Chan c72b9c33ef 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>
2023-11-30 13:57:00 +02:00
..
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-02-20 17:41:08 -08:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2022-08-04 12:12:54 -07:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2015-07-16 00:06:05 -07:00
2023-10-07 10:43:04 +03:00
2023-01-09 17:00:54 +01:00
2019-07-19 17:05:08 -07:00
2023-01-09 17:00:54 +01:00
2023-02-20 17:41:08 -08:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-06-02 12:33:48 +03:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-05-31 08:30:43 +03:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00
2023-01-09 17:00:54 +01:00