diff options
author | Andrea Righi <arighi@develer.com> | 2010-08-19 14:13:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-20 09:34:54 -0700 |
commit | d83a71c4219191a9a881318ae5ca9b39aa1d0540 (patch) | |
tree | 8556b81fb6a07e53735f4984780f8a8caf133383 /samples/kfifo | |
parent | 7b34d5257a90c419d67c1c3b52f87a679845ef1e (diff) | |
download | linux-rpi-d83a71c4219191a9a881318ae5ca9b39aa1d0540.tar.gz linux-rpi-d83a71c4219191a9a881318ae5ca9b39aa1d0540.tar.bz2 linux-rpi-d83a71c4219191a9a881318ae5ca9b39aa1d0540.zip |
kfifo: fix a memory leak in dma example
We use a dynamically allocated kfifo in the dma example, so we need to
free it when unloading the module.
Signed-off-by: Andrea Righi <arighi@develer.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'samples/kfifo')
-rw-r--r-- | samples/kfifo/dma-example.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c index 03433ca5bdad..3682278785f7 100644 --- a/samples/kfifo/dma-example.c +++ b/samples/kfifo/dma-example.c @@ -105,9 +105,7 @@ static int __init example_init(void) static void __exit example_exit(void) { -#ifdef DYNAMIC - kfifo_free(&test); -#endif + kfifo_free(&fifo); } module_init(example_init); |