diff options
author | 2024-06-06 10:37:03 +0800 | |
---|---|---|
committer | 2024-06-17 10:33:30 +0200 | |
commit | 8f773bfbdd428819328a2d185976cfc6ae811cd3 (patch) | |
tree | 843de7da624d6df1e1b283719d78e19e4c22fcff /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | pinctrl: core: fix possible memory leak when pinctrl_enable() fails (diff) | |
download | wireguard-linux-8f773bfbdd428819328a2d185976cfc6ae811cd3.tar.xz wireguard-linux-8f773bfbdd428819328a2d185976cfc6ae811cd3.zip |
pinctrl: single: fix possible memory leak when pinctrl_enable() fails
This driver calls pinctrl_register_and_init() which is not
devm_ managed, it will leads memory leak if pinctrl_enable()
fails. Replace it with devm_pinctrl_register_and_init().
And call pcs_free_resources() if pinctrl_enable() fails.
Fixes: 5038a66dad01 ("pinctrl: core: delete incorrect free in pinctrl_enable()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240606023704.3931561-3-yangyingliang@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions