Skip to content

Commit

Permalink
[PATCH] I2C: m41t00: fix incorrect kfree
Browse files Browse the repository at this point in the history
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: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Jul 11, 2005
1 parent 2146fec commit 5da69ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/chips/m41t00.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ m41t00_detach(struct i2c_client *client)
int rc;

if ((rc = i2c_detach_client(client)) == 0) {
kfree(i2c_get_clientdata(client));
kfree(client);
tasklet_kill(&m41t00_tasklet);
}
return rc;
Expand Down

0 comments on commit 5da69ba

Please sign in to comment.