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>
This commit is contained in:
committed by
Linus Torvalds
parent
7b34d5257a
commit
d83a71c421
@@ -105,9 +105,7 @@ static int __init example_init(void)
|
|||||||
|
|
||||||
static void __exit example_exit(void)
|
static void __exit example_exit(void)
|
||||||
{
|
{
|
||||||
#ifdef DYNAMIC
|
kfifo_free(&fifo);
|
||||||
kfifo_free(&test);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(example_init);
|
module_init(example_init);
|
||||||
|
Reference in New Issue
Block a user