Skip to content

Commit

Permalink
V4L/DVB (6265): Prevent for calling mmap_free without an allocated bu…
Browse files Browse the repository at this point in the history
…ffer

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>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 3bef5e4 commit cd4765e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd4765e

Please sign in to comment.