Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);