Skip to content

Commit

Permalink
V4L/DVB (6263): Fix buffer release code
Browse files Browse the repository at this point in the history
Release code should happen before the cleaning of map variable.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 10, 2007
1 parent e78dcf5 commit 123f8ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/video/videobuf-vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ videobuf_vm_close(struct vm_area_struct *vma)

if (mem->map != map)
continue;

q->ops->buf_release(q,q->bufs[i]);

mem->map = NULL;
q->bufs[i]->baddr = 0;
q->ops->buf_release(q,q->bufs[i]);
}
mutex_unlock(&q->lock);
kfree(map);
Expand Down

0 comments on commit 123f8ef

Please sign in to comment.