aboutsummaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-14 00:13:34 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-14 00:13:34 -0500
commit642fde17dceceb56c7ba2762733ac688666ae657 (patch)
tree9270c7956ba5c3cfe82c2fc3ec380a6d673e668f /drivers/input
parent9d921116cc5e27c1950b7e7508fdefec04a69963 (diff)
Input: gameport - fix memory leak
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/gameport/gameport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index bcfd700829a..36644bff379 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -266,6 +266,7 @@ static void gameport_queue_event(void *object, struct module *owner,
if ((event = kmalloc(sizeof(struct gameport_event), GFP_ATOMIC))) {
if (!try_module_get(owner)) {
printk(KERN_WARNING "gameport: Can't get module reference, dropping event %d\n", event_type);
+ kfree(event);
goto out;
}