From: Richard Fitzgerald Date: Fri, 9 Dec 2016 09:57:41 +0000 (+0000) Subject: ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path X-Git-Tag: v4.10-rc1~121^2~3^2~13^3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d41c74dcb6778ae92d985e4d32055345c3a1fed;p=thirdparty%2Flinux.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index ff111a82fa3fd..593b7d1aed469 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -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);