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

index 966600779b7009f6d97ae06f87bc1981092f29fc..6521034bc93328289819d92894fd2388401cecbb 100644 (file)
@@ -196,6 +196,7 @@ static void serio_queue_event(void *object, struct module *owner,
        if ((event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC))) {
                if (!try_module_get(owner)) {
                        printk(KERN_WARNING "serio: Can't get module reference, dropping event %d\n", event_type);
+                       kfree(event);
                        goto out;
                }