From: Andrea Righi Date: Thu, 19 Aug 2010 21:13:30 +0000 (-0700) Subject: kfifo: fix a memory leak in dma example X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d83a71c4219191a9a881318ae5ca9b39aa1d0540;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- 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);