mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-13 11:51:32 +00:00
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:
parent
7b34d5257a
commit
d83a71c421
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user