drivers/input/gameport/gameport.c: fix a memory leak
PATCH 1/1 drivers/input/gameport/gameport.c: fix a memory leak
This patch fixes a memory leak found by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
drivers/input/gameport/gameport.c renamed from drivers/input/gameport/gameport.c.old +1 -0
@@ -266,6 +266,7 @@ static void gameport_queue_event(void *oif ((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; }
Quoted 2 lines · Adrian Bunk
This patch fixes a memory leak found by the Coverity checker.
Both patches applied, thank you Adrian.
Because the leak is very hard to trigger it will not be merged until 2.6.17 opens up.
Signature · 1 line
Dmitry