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 <[email protected]>
Acked-by: Stefani Seibold <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Andrea Righi 2010-08-19 14:13:30 -07:00 • committed by Linus Torvalds
commit d83a71c421

View 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);