mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
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>
This commit is contained in:
parent
31968ecf58
commit
88fcf710c1
@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev,
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
kfree(keymap);
|
||||
kfree(map);
|
||||
return error;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user