Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
kfifo: fix a memory leak in dma example
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrea Righi authored and torvalds committed Aug 20, 2010
1 parent 7b34d52 commit d83a71c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions samples/kfifo/dma-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d83a71c

Please sign in to comment.