Commit 88fcf710 authored by Yong Wang's avatar Yong Wang Committed by Dmitry Torokhov

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: default avatarYong Wang <yong.y.wang@intel.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 31968ecf
......@@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev,
return 0;
err_out:
kfree(keymap);
kfree(map);
return error;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment