]> Git Repo - linux.git/commitdiff
Input: gameport - fix memory leak
authorAdrian Bunk <[email protected]>
Tue, 14 Mar 2006 05:13:34 +0000 (00:13 -0500)
committerDmitry Torokhov <[email protected]>
Tue, 14 Mar 2006 05:13:34 +0000 (00:13 -0500)
Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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;
                }
 
This page took 0.061384 seconds and 4 git commands to generate.