diff options
author | Wenwen Wang <wenwen@cs.uga.edu> | 2019-08-19 23:00:02 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-08-31 17:04:57 +0200 |
commit | e027a2dea5fdde05740a98f571fc2903060559ce (patch) | |
tree | edc75af2c0a56bd09f9d9773009457e7ab2fdcf3 /drivers/hwmon/s3c-hwmon.c | |
parent | hwmon: (lm75) Fix write operations for negative temperatures (diff) | |
download | linux-e027a2dea5fdde05740a98f571fc2903060559ce.tar.xz linux-e027a2dea5fdde05740a98f571fc2903060559ce.zip |
hwmon (coretemp) Fix a memory leak bug
In coretemp_init(), 'zone_devices' is allocated through kcalloc().
However, it is not deallocated in the following execution if
platform_driver_register() fails, leading to a memory leak. To fix this
issue, introduce the 'outzone' label to free 'zone_devices' before
returning the error.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Link: https://lore.kernel.org/r/1566248402-6538-1-git-send-email-wenwen@cs.uga.edu
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/s3c-hwmon.c')
0 files changed, 0 insertions, 0 deletions