Commit 1a8c3312 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

rtc-core: fix memory leak

commit 2a7a06a0 upstream.

The idr should be destroyed when the module is unloaded. Found with
kmemleak.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 154d9b4d
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment