From: Robert Fitzsimons <robfitz@273k.net>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] bttv: Fix memory leak in radio_release
Date: Thu, 10 Apr 2008 10:40:31 +0100 [thread overview]
Message-ID: <20080410094031.GA2532@localhost> (raw)
Fix the leak of the bttv_fh structure allocated in radio_open which
was introduced by commit 5cd3955cb8adfc1edf481e9e1cb2289db50ccacb.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
drivers/media/video/bt8xx/bttv-driver.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Seeing as commit 'V4L/DVB (7277): bttv: Re-enabling radio support
requires the use of struct bttv_fh' made it into mainline I better fix
the memory leak I introduced.
Robert
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index fcf8f2d..59a8847 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3457,6 +3457,9 @@ static int radio_release(struct inode *inode, struct file *file)
struct bttv *btv = fh->btv;
struct rds_command cmd;
+ file->private_data = NULL;
+ kfree(fh);
+
btv->radio_user--;
bttv_call_i2c_clients(btv, RDS_CMD_CLOSE, &cmd);
--
1.5.4.3.484.g60e3
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
reply other threads:[~2008-04-10 9:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080410094031.GA2532@localhost \
--to=robfitz@273k.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/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