forked from luck/tmp_suning_uos_patched
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: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
35f4403edb
commit
4d41c74dcb
@ -187,7 +187,7 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len,
|
||||
|
||||
buf->buf = vmalloc(len);
|
||||
if (!buf->buf) {
|
||||
vfree(buf);
|
||||
kfree(buf);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(buf->buf, src, len);
|
||||
|
Loading…
Reference in New Issue
Block a user