diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-12-10 05:54:32 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 17:42:27 +0200 |
commit | d4db588ccc738528601947d57fd398bb3f55cd31 (patch) | |
tree | d6e994732000572bd9eddfdd28721b8c7904ad20 /drivers/media/video/videobuf-dma-contig.c | |
parent | V4L/DVB (10303): pvrusb2: Use usb_make_path() to determine device bus location (diff) | |
download | linux-d4db588ccc738528601947d57fd398bb3f55cd31.tar.xz linux-d4db588ccc738528601947d57fd398bb3f55cd31.zip |
V4L/DVB (10304): buf-dma-contig: fix USERPTR free handling
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 'drivers/media/video/videobuf-dma-contig.c')
-rw-r--r-- | drivers/media/video/videobuf-dma-contig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index 31944b11e6ea..6109fb5f34e2 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -400,7 +400,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) |