diff options
author | Yong Wang <yong.y.wang@linux.intel.com> | 2010-03-19 23:02:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 07:47:54 -0700 |
commit | f0736a48d05685fae9afa5b13d9eab5b8dcd34f4 (patch) | |
tree | f365f691b339675d617a4445dc79c7712d545e38 /drivers | |
parent | e58bcaf0556d4507abab778f1a919e45d4d5639a (diff) |
Input: sparse-keymap - free the right keymap on error
commit 88fcf710c13bd41f2b98c5411e4f21ab98da4fb4 upstream.
'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>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-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 fbd3987af57f..e8d65b372034 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c @@ -161,7 +161,7 @@ int sparse_keymap_setup(struct input_dev *dev, return 0; err_out: - kfree(keymap); + kfree(map); return error; } |