diff options
author | Yong Wang <yong.y.wang@linux.intel.com> | 2010-03-20 07:02:16 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-03-20 07:03:09 +0100 |
commit | 88fcf710c13bd41f2b98c5411e4f21ab98da4fb4 (patch) | |
tree | 70302e38f10076fb6844090366cfe270b622a9e0 /drivers/input/sparse-keymap.c | |
parent | Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table (diff) | |
download | linux-88fcf710c13bd41f2b98c5411e4f21ab98da4fb4.tar.xz linux-88fcf710c13bd41f2b98c5411e4f21ab98da4fb4.zip |
Input: sparse-keymap - free the right keymap on error
'map' is allocated in sparse_keymap_setup() and it it the one that should
be freed on error instead of 'keymap'.
Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/sparse-keymap.c')
-rw-r--r-- | drivers/input/sparse-keymap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index e6bde55e5203..f64e004935a9 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c @@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev, return 0; err_out: - kfree(keymap); + kfree(map); return error; } |