提交 5da69ba4 编写于 作者: J Jean Delvare 提交者: Greg Kroah-Hartman

[PATCH] I2C: m41t00: fix incorrect kfree

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.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2146fec2
...@@ -207,7 +207,7 @@ m41t00_detach(struct i2c_client *client) ...@@ -207,7 +207,7 @@ m41t00_detach(struct i2c_client *client)
int rc; int rc;
if ((rc = i2c_detach_client(client)) == 0) { if ((rc = i2c_detach_client(client)) == 0) {
kfree(i2c_get_clientdata(client)); kfree(client);
tasklet_kill(&m41t00_tasklet); tasklet_kill(&m41t00_tasklet);
} }
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册