Commit cb46f472 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Greg Kroah-Hartman

Staging: panel: fix memory leak

panel_bind_key() must free allocated memory.
Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d85170ed
...@@ -1995,8 +1995,10 @@ static struct logical_input *panel_bind_key(char *name, char *press, ...@@ -1995,8 +1995,10 @@ static struct logical_input *panel_bind_key(char *name, char *press,
return NULL; return NULL;
} }
if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i, if (!input_name2mask(name, &key->mask, &key->value, &scan_mask_i,
&scan_mask_o)) &scan_mask_o)) {
kfree(key);
return NULL; return NULL;
}
key->type = INPUT_TYPE_KBD; key->type = INPUT_TYPE_KBD;
key->state = INPUT_ST_LOW; key->state = INPUT_ST_LOW;
......
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