Commit 8f6f3035 authored by Yuan Chen's avatar Yuan Chen Committed by Linus Walleij
Browse files

pinctrl: berlin: fix memory leak in berlin_pinctrl_build_state()



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: de845036 ("pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()")
Signed-off-by: default avatarYuan Chen <chenyuan@kylinos.cn>
Link: https://lore.kernel.org/20250620015343.21494-1-chenyuan_fl@163.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e3507c56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment