From: Adrian Bunk Date: Tue, 14 Mar 2006 05:13:34 +0000 (-0500) Subject: Input: gameport - fix memory leak X-Git-Tag: v2.6.17-rc1~15^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=642fde17dceceb56c7ba2762733ac688666ae657;p=linux-2.6 Input: gameport - fix memory leak Signed-off-by: Adrian Bunk Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index bcfd700829..36644bff37 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; }