Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539227
| Path | csiph.com!goblin1!goblin.stu.neva.ru!border1.nntp.ams1.giganews.com!nntp.giganews.com!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path |
| Date | Fri, 09 Dec 2016 11:00:02 +0100 |
| Message-ID | <sMq8a-1Fi-43@gated-at.bofh.it> (permalink) |
| Authentication-Results | ppops.net; spf=none smtp.mailfrom=rf@opensource.wolfsonmicro.com |
| X-Mailer | git-send-email 1.9.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Proofpoint-Spam-Details | rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1612090146 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 30 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <patches@opensource.wolfsonmicro.com>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org> |
| X-Original-Date | Fri, 9 Dec 2016 09:57:41 +0000 |
| X-Original-Message-ID | <1481277461-2132-1-git-send-email-rf@opensource.wolfsonmicro.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1539227 |
Show key headers only | View raw
buf was allocated by kzalloc() so it should be passed to kfree()
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index ff111a82..593b7d1 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -183,15 +183,15 @@ static struct wm_adsp_buf *wm_adsp_buf_alloc(const void *src, size_t len,
struct wm_adsp_buf *buf = kzalloc(sizeof(*buf), GFP_KERNEL);
if (buf == NULL)
return NULL;
buf->buf = vmalloc(len);
if (!buf->buf) {
- vfree(buf);
+ kfree(buf);
return NULL;
}
memcpy(buf->buf, src, len);
if (list)
list_add_tail(&buf->list, list);
--
1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2016-12-09 11:00 +0100
csiph-web