Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 123f8ef6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

V4L/DVB (6263): Fix buffer release code



Release code should happen before the cleaning of map variable.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent e78dcf55
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);