Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: gameport - fix memory leak

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Adrian Bunk and committed by
Dmitry Torokhov
642fde17 9d921116

+1
+1
drivers/input/gameport/gameport.c
··· 266 266 if ((event = kmalloc(sizeof(struct gameport_event), GFP_ATOMIC))) { 267 267 if (!try_module_get(owner)) { 268 268 printk(KERN_WARNING "gameport: Can't get module reference, dropping event %d\n", event_type); 269 + kfree(event); 269 270 goto out; 270 271 } 271 272