projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef4d4d1
)
iio:kfifo: Fix memory leak
author
Lars-Peter Clausen
<lars@metafoo.de>
Tue, 15 Oct 2013 08:30:00 +0000
(09:30 +0100)
committer
Jonathan Cameron
<jic23@kernel.org>
Tue, 15 Oct 2013 18:18:34 +0000
(19:18 +0100)
We need to free the kfifo when we release the buffer, otherwise the fifos memory
will be leaked.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/kfifo_buf.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/kfifo_buf.c
b/drivers/iio/kfifo_buf.c
index b4ac55a29fc4c04e310579d6379090477268ab47..ce51092695ab8fd7ec9a279aa77c2d88ca0b71df 100644
(file)
--- a/
drivers/iio/kfifo_buf.c
+++ b/
drivers/iio/kfifo_buf.c
@@
-132,7
+132,10
@@
static int iio_read_first_n_kfifo(struct iio_buffer *r,
static void iio_kfifo_buffer_release(struct iio_buffer *buffer)
{
- kfree(iio_to_kfifo(buffer));
+ struct iio_kfifo *kf = iio_to_kfifo(buffer);
+
+ kfifo_free(&kf->kf);
+ kfree(kf);
}
static const struct iio_buffer_access_funcs kfifo_access_funcs = {