diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-02-14 23:14:51 +0800 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-02-24 10:51:29 +0100 |
| commit | 7a648d598cb8e8c62af3f0e020a25820a3f3a9a7 (patch) | |
| tree | 978886172b4afe47f08ee4a5feccf083be0b2a8b /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | 09a30b7a035f9f4ac918c8a9af89d70e43462152 (diff) | |
pinctrl: pinconf-generic: Fix memory leak in pinconf_generic_parse_dt_config()
In pinconf_generic_parse_dt_config(), if parse_dt_cfg() fails, it returns
directly. This bypasses the cleanup logic and results in a memory leak of
the cfg buffer.
Fix this by jumping to the out label on failure, ensuring kfree(cfg) is
called before returning.
Fixes: 90a18c512884 ("pinctrl: pinconf-generic: Handle string values for generic properties")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Antonio Borneo <antonio.borneo@foss.st.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
