]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (6265): Prevent for calling mmap_free without an allocated buffer
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 25 Sep 2007 14:53:24 +0000 (11:53 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 03:02:55 +0000 (00:02 -0300)
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>
drivers/media/video/videobuf-core.c

index 256501384af71d312f10244b2585301189be7702..eb3b98400c1b6c802a292a0deb61e54d678862c4 100644 (file)
@@ -880,6 +880,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);