OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671386b
)
Input: wistron_btns - fix a memory leak in wb_module_init error path
author
Axel Lin
<axel.lin@gmail.com>
Mon, 28 Jun 2010 08:10:01 +0000
(
01:10
-0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Mon, 28 Jun 2010 08:12:22 +0000
(
01:12
-0700)
select_keymap() calls copy_keymap() to allocate a memory for keymap.
This patch adds a missing kfree(keymap) in wb_module_init error path.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/wistron_btns.c
patch
|
blob
|
history
diff --git
a/drivers/input/misc/wistron_btns.c
b/drivers/input/misc/wistron_btns.c
index
4dac8b7
..
12501de
100644
(file)
--- a/
drivers/input/misc/wistron_btns.c
+++ b/
drivers/input/misc/wistron_btns.c
@@
-1347,7
+1347,7
@@
static int __init wb_module_init(void)
err = map_bios();
if (err)
-
return err
;
+
goto err_free_keymap
;
err = platform_driver_register(&wistron_driver);
if (err)
@@
-1371,6
+1371,8
@@
static int __init wb_module_init(void)
platform_driver_unregister(&wistron_driver);
err_unmap_bios:
unmap_bios();
+ err_free_keymap:
+ kfree(keymap);
return err;
}