Dinghao Liu ebcb4e19d3 ASoC: wm_adsp: fix memleak in wm_adsp_buffer_populate
[ Upstream commit 29046a78a3c0a1f8fa0427f164caa222f003cf5b ]

When wm_adsp_buffer_read() fails, we should free buf->regions.
Otherwise, the callers of wm_adsp_buffer_populate() will
directly free buf on failure, which makes buf->regions a leaked
memory.

Fixes: a792af69b08f ("ASoC: wm_adsp: Refactor compress stream initialisation")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231204074158.12026-1-dinghao.liu@zju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:15 +01:00
..
2022-08-16 12:46:26 +02:00
2022-10-05 12:02:07 -07:00
2021-04-20 17:25:51 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-10-05 12:02:07 -07:00
2023-02-22 12:59:42 +01:00
2022-10-05 12:02:07 -07:00
2022-07-11 15:51:01 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-10-05 12:02:07 -07:00
2021-03-31 18:00:38 +01:00
2023-09-13 09:42:22 +02:00
2022-06-06 12:33:10 +01:00
2022-07-13 13:48:56 +01:00
2022-10-19 16:37:01 +01:00
2022-10-05 12:02:07 -07:00
2022-09-30 09:16:31 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2020-05-07 13:18:04 +01:00
2022-10-13 13:01:32 +01:00
2022-10-13 13:01:32 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-10-19 16:37:01 +01:00
2021-12-06 10:04:05 +01:00
2022-07-08 11:52:42 +01:00
2021-12-06 10:04:05 +01:00
2022-08-15 01:20:01 +01:00
2022-10-03 16:30:42 +02:00
2020-07-20 15:34:29 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2020-10-02 21:05:29 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-12-31 13:33:07 +01:00
2022-08-16 12:46:26 +02:00
2022-07-11 15:51:01 +01:00
2022-08-16 12:46:26 +02:00