提交 88fcf710 编写于 作者: Y Yong Wang 提交者: 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: NYong Wang <yong.y.wang@intel.com>
Cc: stable@kernel.org
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册