diff options
author | Aaro Koskinen <aaro.koskinen@nokia.com> | 2010-03-05 13:44:24 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-15 08:49:41 -0700 |
commit | 1a8c3312c8db953779ba8480567880da165aa57b (patch) | |
tree | 86456d40765e8f03714dcef481393060ae37183b | |
parent | 154d9b4d57283cb6e6d446445fef805525f613ea (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>
-rw-r--r-- | drivers/rtc/class.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index be5a6b73e60..40845c7e932 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -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); |