[lm-sensors] [PATCH 2.6] I2C: m41t00: fix incorrect kfree
Jean Delvare
khali at linux-fr.org
Fri Jul 1 14:28:15 CEST 2005
Hi Greg,
Here is a simple path fixing an incorrect kfree in the m41t00 i2c chip
driver. The current code happens to work by accident, but the freed
pointer isn't the one which was allocated in the first place, which
could cause problems later.
Please apply,
thanks.
Signed-off-by: Jean Delvare <khali at linux-fr.org>
drivers/i2c/chips/m41t00.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.13-rc1.orig/drivers/i2c/chips/m41t00.c 2005-06-29 18:29:43.000000000 +0200
+++ linux-2.6.13-rc1/drivers/i2c/chips/m41t00.c 2005-06-29 18:46:05.000000000 +0200
@@ -207,7 +207,7 @@
int rc;
if ((rc = i2c_detach_client(client)) == 0) {
- kfree(i2c_get_clientdata(client));
+ kfree(client);
tasklet_kill(&m41t00_tasklet);
}
return rc;
--
Jean Delvare
More information about the lm-sensors
mailing list