summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/videobuf-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-09-25 11:53:24 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-09-25 11:53:24 -0300
commitc594848c181742c41a59366a72b70cea997446fd (patch)
treefe0427dfac03c34f35a5f1ffe32abeff1b5e2541 /linux/drivers/media/video/videobuf-core.c
parent1210836fc78a6ffafa0c4c3ffb44f4c282cd2b1a (diff)
downloadmediapointer-dvb-s2-c594848c181742c41a59366a72b70cea997446fd.tar.gz
mediapointer-dvb-s2-c594848c181742c41a59366a72b70cea997446fd.tar.bz2
Prevent for calling mmap_free without an allocated buffer
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux/drivers/media/video/videobuf-core.c')
-rw-r--r--linux/drivers/media/video/videobuf-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c
index f5d700364..a446067fd 100644
--- a/linux/drivers/media/video/videobuf-core.c
+++ b/linux/drivers/media/video/videobuf-core.c
@@ -881,6 +881,9 @@ int videobuf_mmap_free(struct videobuf_queue *q)
int i;
int rc;
+ if (!q)
+ return 0;
+
MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
rc = CALL(q,mmap_free,q);