summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bttv-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/bttv-driver.c')
-rw-r--r--drivers/media/video/bttv-driver.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
index 5bc522259d36..f9d581cd31db 100644
--- a/drivers/media/video/bttv-driver.c
+++ b/drivers/media/video/bttv-driver.c
@@ -2952,6 +2952,8 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
fh->cap.read_buf->memory = V4L2_MEMORY_USERPTR;
field = videobuf_next_field(&fh->cap);
if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,field)) {
+ kfree (fh->cap.read_buf);
+ fh->cap.read_buf = NULL;
up(&fh->cap.lock);
return POLLERR;
}
OpenPOWER on IntegriCloud