-
- Downloads
[PATCH] drivers/hwmon/*: kfree() correct pointers
The adm9240 driver, in adm9240_detect(), allocates a structure. The error path attempts to kfree() ->client field of it (second one), resulting in an oops (or slab corruption) if the hardware is not present. ->client field in adm1026, adm1031, smsc47b397 and smsc47m1 is the first in ${HWMON}_data structure, but fix them too. Signed-off-by:Jonathan Corbet <corbet@lwn.net> Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
Showing
- drivers/hwmon/adm1026.c 1 addition, 1 deletiondrivers/hwmon/adm1026.c
- drivers/hwmon/adm1031.c 1 addition, 1 deletiondrivers/hwmon/adm1031.c
- drivers/hwmon/adm9240.c 1 addition, 1 deletiondrivers/hwmon/adm9240.c
- drivers/hwmon/smsc47b397.c 1 addition, 1 deletiondrivers/hwmon/smsc47b397.c
- drivers/hwmon/smsc47m1.c 1 addition, 1 deletiondrivers/hwmon/smsc47m1.c
Please register or sign in to comment