Commit 4d41c74d authored by Richard Fitzgerald's avatar Richard Fitzgerald Committed by Mark Brown

ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path

buf was allocated by kzalloc() so it should be passed to kfree()
Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 35f4403e
...@@ -187,7 +187,7 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len, ...@@ -187,7 +187,7 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len,
buf->buf = vmalloc(len); buf->buf = vmalloc(len);
if (!buf->buf) { if (!buf->buf) {
vfree(buf); kfree(buf);
return NULL; return NULL;
} }
memcpy(buf->buf, src, len); memcpy(buf->buf, src, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment