public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] videobuf-dma-contig: fix USERPTR free handling
@ 2008-12-10  4:54 Magnus Damm
  2009-01-11 18:26 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2008-12-10  4:54 UTC (permalink / raw)
  To: video4linux-list; +Cc: g.liakhovetski, mchehab

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>
---

 drivers/media/video/videobuf-dma-contig.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/drivers/media/video/videobuf-dma-contig.c
+++ work/drivers/media/video/videobuf-dma-contig.c	2008-12-07 22:34:47.000000000 +0900
@@ -400,7 +400,7 @@ void videobuf_dma_contig_free(struct vid
 	   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)

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-24  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10  4:54 [PATCH] videobuf-dma-contig: fix USERPTR free handling Magnus Damm
2009-01-11 18:26 ` Guennadi Liakhovetski
2009-01-16  4:57   ` Magnus Damm
2009-01-24  0:54     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox