提交 d83a71c4 编写于 作者: A Andrea Righi 提交者: 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: NAndrea Righi <arighi@develer.com>
Acked-by: NStefani Seibold <stefani@seibold.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册