mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
rtc-core: fix memory leak
The idr should be destroyed when the module is unloaded. Found with kmemleak. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: stable <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2e84067b6e
commit
2a7a06a0cd
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue