mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 07:03:37 +02:00
rtc-core: fix memory leak
commit 2a7a06a0cd 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>
This commit is contained in:
parent
154d9b4d57
commit
1a8c3312c8
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user