diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-10 13:54:32 +0900 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-10 13:54:32 +0900 |
commit | 1d87613f55892692a6cd94ae9858ef52e5f34d97 (patch) | |
tree | 9b4da5706d5b5274b1ee891575b43db6eff9d8bd /linux/drivers/media | |
parent | 817280578765c7334fce02fe793591e2e146394d (diff) | |
download | mediapointer-dvb-s2-1d87613f55892692a6cd94ae9858ef52e5f34d97.tar.gz mediapointer-dvb-s2-1d87613f55892692a6cd94ae9858ef52e5f34d97.tar.bz2 |
buf-dma-contig: fix USERPTR free handling
From: Magnus Damm <damm@igel.co.jp>
This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
video buffers.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/videobuf-dma-contig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/videobuf-dma-contig.c b/linux/drivers/media/video/videobuf-dma-contig.c index a3bf4c151..6db1398fd 100644 --- a/linux/drivers/media/video/videobuf-dma-contig.c +++ b/linux/drivers/media/video/videobuf-dma-contig.c @@ -401,7 +401,7 @@ void videobuf_dma_contig_free(struct videobuf_queue *q, So, it should free memory only if the memory were allocated for read() operation. */ - if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr) + if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr) return; if (!mem) |