mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
Staging: panel: fix memory leak
panel_bind_key() must free allocated memory. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
d85170ed30
commit
cb46f472cb
@ -1995,8 +1995,10 @@ static struct logical_input *panel_bind_key(char *name, char *press,
|
||||
return NULL;
|
||||
}
|
||||
if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i,
|
||||
&scan_mask_o))
|
||||
&scan_mask_o)) {
|
||||
kfree(key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
key->type = INPUT_TYPE_KBD;
|
||||
key->state = INPUT_ST_LOW;
|
||||
|
Loading…
Reference in New Issue
Block a user