From: Wolfram Sang <w.sang@pengutronix.de>
To: kernel-janitors@vger.kernel.org
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Wolfram Sang <w.sang@pengutronix.de>,
Petr Vandrovec <vandrove@vc.cvut.cz>,
linux-fbdev@vger.kernel.org
Subject: [PATCH 23/24] video/matrox: fix dangling pointers
Date: Sat, 20 Mar 2010 14:13:04 +0000 [thread overview]
Message-ID: <1269094385-16114-24-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1269094385-16114-1-git-send-email-w.sang@pengutronix.de>
Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
---
Found using coccinelle, then reviewed. Full patchset is available via
kernel-janitors, linux-i2c, and LKML.
---
drivers/video/matrox/matroxfb_maven.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index 91af915..e7b0ec3 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -1254,6 +1254,7 @@ static int maven_probe(struct i2c_client *client,
goto ERROR4;
return 0;
ERROR4:;
+ i2c_set_clientdata(client, NULL);
kfree(data);
ERROR0:;
return err;
--
1.7.0
next parent reply other threads:[~2010-03-20 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1269094385-16114-1-git-send-email-w.sang@pengutronix.de>
2010-03-20 14:13 ` Wolfram Sang [this message]
[not found] ` <1269094385-16114-24-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-05 14:04 ` [PATCH 23/24] video/matrox: fix dangling pointers James Simmons
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=1269094385-16114-24-git-send-email-w.sang@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vandrove@vc.cvut.cz \
/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;
as well as URLs for NNTP newsgroup(s).