Files
linux-stable-mirror/drivers/pinctrl/berlin
Yuan Chen b2b740a884 pinctrl: berlin: fix memory leak in berlin_pinctrl_build_state()
[ Upstream commit 8f6f303551 ]

In the original implementation, krealloc() failure handling incorrectly
assigned the original memory pointer to NULL after kfree(), causing a
memory leak when reallocation failed.

Fixes: de845036f9 ("pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Link: https://lore.kernel.org/20250620015343.21494-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:51 +02:00
..