提交 1a8e0e33 编写于 作者: D Devin Heitmueller 提交者: Mauro Carvalho Chehab

V4L/DVB: cx18-alsa: fix memory leak in error condition

If the stream is already in use, make sure we free up the memory allocated
earlier.

Thanks to Andy Wall for reviewing and pointing this out.

This work was sponsored by ONELAN Limited.
Signed-off-by: NDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 485e319a
......@@ -95,6 +95,7 @@ static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream)
/* See if the stream is available */
if (cx18_claim_stream(item, item->type)) {
/* No, it's already in use */
kfree(item);
return -EBUSY;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册