aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2010-03-05 16:44:24 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 12:05:58 -0400
commit4d57ebd581a5dc9e1fdb6b59c34ddec72013f5b8 (patch)
tree656d2f1772d20d75fb37e7d5f2ecf96eed5eb777 /drivers
parenta7ca19cde1d0a1fa9613be3d54dcd65e8ec47904 (diff)
rtc-core: fix memory leak
commit 2a7a06a0cdd86d572e91657603180da5992be6d3 upstream. 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/class.c1
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
231subsys_initcall(rtc_init); 232subsys_initcall(rtc_init);