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