Input: gameport - fix memory leak

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Adrian Bunk 2006-03-14 00:13:34 -05:00 committed by Dmitry Torokhov
parent 9d921116cc
commit 642fde17dc

View 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;
}