summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/serio/serio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 966600779b7..6521034bc93 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;
}