dect
/
linux-2.6
Archived
13
0
Fork 0

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:
Andrea Righi 2010-08-19 14:13:30 -07:00 committed by Linus Torvalds
parent 7b34d5257a
commit d83a71c421
1 changed files with 1 additions and 3 deletions

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