diff options
| author | Cristian Ciocaltea <[email protected]> | 2023-12-19 05:07:23 +0200 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2024-01-22 00:06:28 +0000 |
| commit | 222be59e5eed1554119294edc743ee548c2371d0 (patch) | |
| tree | 29b96b555830225e2c42936d1d43f38f5a7a243d /tools/perf/scripts/python | |
| parent | a4832a94688000662d4ebb8a1c05f086a9c98826 (diff) | |
ASoC: SOF: amd: Fix memory leak in amd_sof_acp_probe()
Driver uses kasprintf() to initialize fw_{code,data}_bin members of
struct acp_dev_data, but kfree() is never called to deallocate the
memory, which results in a memory leak.
Fix the issue by switching to devm_kasprintf(). Additionally, ensure the
allocation was successful by checking the pointer validity.
Fixes: f7da88003c53 ("ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform")
Signed-off-by: Cristian Ciocaltea <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Link: https://msgid.link/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions