Commit d83a71c4 authored by Andrea Righi's avatar Andrea Righi Committed by Linus Torvalds

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: default avatarAndrea Righi <arighi@develer.com>
Acked-by: default avatarStefani Seibold <stefani@seibold.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7b34d525
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment