commit | 38d8ed65092ed22f52a95f397855cace0260e110 | [log] [tgz] |
---|---|---|
author | Colin Ian King <colin.king@canonical.com> | Sun Oct 23 21:56:08 2016 +0100 |
committer | Guenter Roeck <linux@roeck-us.net> | Mon Oct 24 06:05:13 2016 -0700 |
tree | 59b5e01b4d1f349b736a8c0e4ce3cf8f3338cafd | |
parent | 07d9a380680d1c0eb51ef87ff2eab5c994949e69 [diff] |
hwmon: (core) fix resource leak on devm_kcalloc failure If dev_kcalloc fails to allocate hw_dev->groups then the current exit path is a direct return, causing a leak of resources such as hwdev and ida is not removed. Fix this by exiting via the free_hwmon exit path that performs the necessary resource cleanup. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>