Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ int sparse_keymap_setup(struct input_dev *dev,
	return 0;

 err_out:
	kfree(keymap);
	kfree(map);
	return error;

}