diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-09-25 11:53:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-09-25 11:53:24 -0300 |
commit | c594848c181742c41a59366a72b70cea997446fd (patch) | |
tree | fe0427dfac03c34f35a5f1ffe32abeff1b5e2541 /linux/drivers/media/video/videobuf-core.c | |
parent | 1210836fc78a6ffafa0c4c3ffb44f4c282cd2b1a (diff) | |
download | mediapointer-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.c | 3 |
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); |