]> err.no Git - linux-2.6/commitdiff
Input: gameport - fix memory leak
authorAdrian Bunk <bunk@stusta.de>
Tue, 14 Mar 2006 05:13:34 +0000 (00:13 -0500)
committerDmitry Torokhov <dtor_core@ameritech.net>
Tue, 14 Mar 2006 05:13:34 +0000 (00:13 -0500)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/gameport/gameport.c

index bcfd700829a1406173ed718f68b251b1191fca03..36644bff379d5126a90d209fc71f8605ab4b74e9 100644 (file)
@@ -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;
                }