diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-12-12 17:38:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:10:44 -0300 |
commit | 1a8e0e33881c9dd8cf3514bfd0b5a7ef148da929 (patch) | |
tree | a4c93083d474c6697fab74d411399dbd0c95eef6 /drivers/media/video | |
parent | 485e319adef5d33a1dca4320cb26fb387b4a9381 (diff) | |
download | blackbird-op-linux-1a8e0e33881c9dd8cf3514bfd0b5a7ef148da929.tar.gz blackbird-op-linux-1a8e0e33881c9dd8cf3514bfd0b5a7ef148da929.zip |
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: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx18/cx18-alsa-pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/video/cx18/cx18-alsa-pcm.c index 05cb8f1753b5..e14f8e42a2ab 100644 --- a/drivers/media/video/cx18/cx18-alsa-pcm.c +++ b/drivers/media/video/cx18/cx18-alsa-pcm.c @@ -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; } |