[PATCH] Input: gpio_keys - fix a memory leak

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE5513d

2 messages, 2 authors, 2011-06-29 · open the first message on its own page

[PATCH] Input: gpio_keys - fix a memory leak

From: Axel Lin <hidden>
Date: 2011-06-28 02:47:17

Signed-off-by: Axel Lin <redacted>
---
 drivers/input/keyboard/gpio_keys.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 6d0e2f6..cc4bdec 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -569,6 +569,7 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev)
 	}
 
 	input_unregister_device(input);
+	kfree(ddata);
 
 	return 0;
 }
-- 
1.7.4.1


Re: [PATCH] Input: gpio_keys - fix a memory leak

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2011-06-29 08:26:09

On Tue, Jun 28, 2011 at 10:46:21AM +0800, Axel Lin wrote:
Signed-off-by: Axel Lin <redacted>
Applied, thanks Axel.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help