diff options
| author | Zilin Guan <zilin@seu.edu.cn> | 2025-12-28 16:26:36 +0000 |
|---|---|---|
| committer | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2026-01-08 10:17:08 +0100 |
| commit | 6259094ee806fb813ca95894c65fb80e2ec98bf1 (patch) | |
| tree | 97786e9fef45eb4ea298180f7ffd7fef5daefdc4 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff) | |
soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()
In svs_enable_debug_write(), the buf allocated by memdup_user_nul()
is leaked if kstrtoint() fails.
Fix this by using __free(kfree) to automatically free buf, eliminating
the need for explicit kfree() calls and preventing leaks.
Fixes: 13f1bbcfb582 ("soc: mediatek: SVS: add debug commands")
Co-developed-by: Jianhao Xu <jianhao.xu@seu.edu.cn>
Signed-off-by: Jianhao Xu <jianhao.xu@seu.edu.cn>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
[Angelo: Added missing cleanup.h inclusion]
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
