diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2010-03-05 16:44:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:47 -0500 |
commit | 2a7a06a0cdd86d572e91657603180da5992be6d3 (patch) | |
tree | a28063efd5886e95171a7e983e8b63c6e2b2db73 /drivers/rtc | |
parent | 2e84067b6e557b0b85cdbceaf9a9189fc2c26536 (diff) |
rtc-core: fix memory leak
The idr should be destroyed when the module is unloaded. Found with
kmemleak.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index be5a6b73e601..40845c7e9322 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
@@ -226,6 +226,7 @@ static void __exit rtc_exit(void) | |||
226 | { | 226 | { |
227 | rtc_dev_exit(); | 227 | rtc_dev_exit(); |
228 | class_destroy(rtc_class); | 228 | class_destroy(rtc_class); |
229 | idr_destroy(&rtc_idr); | ||
229 | } | 230 | } |
230 | 231 | ||
231 | subsys_initcall(rtc_init); | 232 | subsys_initcall(rtc_init); |