From: Stefani Seibold <stefani@seibold.net>
To: Andrea Righi <arighi@develer.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] kfifo: fix a memory leak in dma example
Date: Fri, 13 Aug 2010 22:42:32 +0200 [thread overview]
Message-ID: <1281732152.12228.1.camel@wall-e.seibold.net> (raw)
In-Reply-To: <1281729545-1663-2-git-send-email-arighi@develer.com>
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>
---
samples/kfifo/dma-example.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/samples/kfifo/dma-example.c b/samples/kfifo/dma-example.c
index 03433ca..3682278 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);
next prev parent reply other threads:[~2010-08-13 20:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 19:59 [PATCH 1/3] kfifo: fix kernel BUG " Andrea Righi
2010-08-13 19:59 ` [PATCH 2/3] kfifo: fix a memory leak " Andrea Righi
2010-08-13 20:42 ` Stefani Seibold [this message]
2010-08-13 19:59 ` [PATCH 3/3] kfifo: add explicit error checking in all the examples Andrea Righi
2010-08-13 20:49 ` Stefani Seibold
2010-08-13 20:40 ` [PATCH 1/3] kfifo: fix kernel BUG in dma example Stefani Seibold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281732152.12228.1.camel@wall-e.seibold.net \
--to=stefani@seibold.net \
--cc=akpm@linux-foundation.org \
--cc=arighi@develer.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome