diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-12 18:48:24 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-22 11:34:52 -0700 |
commit | cb46f472cbb08c44ae47a5bea80207c4e4407ee3 (patch) | |
tree | 4a5c03d33bdd43993df7eaefc60cca60efff1e00 /drivers/staging/panel | |
parent | d85170ed30a533ef6832cf11b38488e562c311c8 (diff) | |
download | blackbird-obmc-linux-cb46f472cbb08c44ae47a5bea80207c4e4407ee3.tar.gz blackbird-obmc-linux-cb46f472cbb08c44ae47a5bea80207c4e4407ee3.zip |
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>
Diffstat (limited to 'drivers/staging/panel')
-rw-r--r-- | drivers/staging/panel/panel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 3e07e41eb885..aeca01c05e40 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -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; |