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>
This commit is contained in:
Aaro Koskinen 2010-03-05 13:44:24 -08:00 committed by Linus Torvalds
parent 2e84067b6e
commit 2a7a06a0cd
1 changed files with 1 additions and 0 deletions

View File

@ -226,6 +226,7 @@ static void __exit rtc_exit(void)
{
rtc_dev_exit();
class_destroy(rtc_class);
idr_destroy(&rtc_idr);
}
subsys_initcall(rtc_init);