提交 d4db588c 编写于 作者: M Magnus Damm 提交者: Mauro Carvalho Chehab

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: NMagnus Damm <damm@igel.co.jp>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 87e3495c
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册