]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
kfifo: fix a memory leak in dma example
authorAndrea Righi <arighi@develer.com>
Thu, 19 Aug 2010 21:13:30 +0000 (14:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 Aug 2010 16:34:54 +0000 (09:34 -0700)
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>
samples/kfifo/dma-example.c

index 03433ca5bdadeeba348b7c5436ee2f3fae28b5d4..3682278785f7e5610c1034a102724882791e6946 100644 (file)
@@ -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);