mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6 patch] drivers/input/serio/serio.c: fix a memory leak
@ 2006-03-11 15:10 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-03-11 15:10 UTC (permalink / raw)
  To: dtor_core; +Cc: linux-input, linux-kernel

This patch fixes a memory leak found by the Coverity checker.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.16-rc5-mm3-full/drivers/input/serio/serio.c.old	2006-03-11 14:29:47.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/drivers/input/serio/serio.c	2006-03-11 14:30:03.000000000 +0100
@@ -196,6 +196,7 @@ static void serio_queue_event(void *obje
 	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;
 		}
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-11 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-11 15:10 [2.6 patch] drivers/input/serio/serio.c: fix a memory leak Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®