From d83a71c4219191a9a881318ae5ca9b39aa1d0540 Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Thu, 19 Aug 2010 14:13:30 -0700 Subject: [PATCH] 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 Acked-by: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- samples/kfifo/dma-example.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c index 03433ca5bdad..3682278785f7 100644 --- a/samples/kfifo/dma-example.c +++ b/samples/kfifo/dma-example.c @@ -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); -- GitLab