* [PATCH] Staging: panel: fix memory leak
@ 2010-07-12 14:48 Kulikov Vasiliy
0 siblings, 0 replies; only message in thread
From: Kulikov Vasiliy @ 2010-07-12 14:48 UTC (permalink / raw)
To: kernel-janitors
Cc: Greg Kroah-Hartman, Willy Tarreau, Peter Huewe, Julia Lawall,
Sudhakar Rajashekhara, devel, linux-kernel
panel_bind_key() must free allocated memory.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
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 3154ffe..0fa910d 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1999,8 +1999,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;
--
1.7.0.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-12 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-12 14:48 [PATCH] Staging: panel: fix memory leak Kulikov Vasiliy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome