Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andrea Righi and committed by
Linus Torvalds
d83a71c4 7b34d525

+1 -3
+1 -3
samples/kfifo/dma-example.c
··· 105 105 106 106 static void __exit example_exit(void) 107 107 { 108 - #ifdef DYNAMIC 109 - kfifo_free(&test); 110 - #endif 108 + kfifo_free(&fifo); 111 109 } 112 110 113 111 module_init(example_init);