Files
linux-stable-mirror/drivers
Yuan Chen 230b23da10 pinctrl: sunxi: Fix memory leak on krealloc failure
[ Upstream commit e3507c56cb ]

In sunxi_pctrl_dt_node_to_map(), when krealloc() fails to resize
the pinctrl_map array, the function returns -ENOMEM directly
without freeing the previously allocated *map buffer. This results
in a memory leak of the original kmalloc_array allocation.

Fixes: e11dee2e98 ("pinctrl: sunxi: Deal with configless pins")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Link: https://lore.kernel.org/20250620012708.16709-1-chenyuan_fl@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:13:50 +02:00
..
2025-07-24 08:56:22 +02:00
2025-08-15 12:13:35 +02:00