From 9d921116cc5e27c1950b7e7508fdefec04a69963 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 14 Mar 2006 00:13:29 -0500 Subject: Input: serio - fix memory leak Signed-off-by: Adrian Bunk Signed-off-by: Dmitry Torokhov --- drivers/input/serio/serio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/input/serio') diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 966600779b70..6521034bc933 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -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; } -- cgit v1.2.3