[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707190057.16051.jesper.juhl@gmail.com>
Date: Thu, 19 Jul 2007 00:57:15 +0200
From: Jesper Juhl <jesper.juhl@...il.com>
To: Corey Minyard <minyard@...sta.com>
Cc: Christian Krafft <krafft@...ibm.com>,
openipmi-developer@...ts.sourceforge.net, minyard@...rch.cirr.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jesper Juhl <jesper.juhl@...il.com>
Subject: [PATCH][IPMI] Fix mem leak in try_init_dmi() code
Hi there,
If we ever hit the "default:" case in the switch in try_init_dmi(),
then we'll leak the storage allocated with kzalloc() and assigned
to 'info'.
Note: patch has been compile tested only.
Please consider merging upstream :-)
Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
---
drivers/char/ipmi/ipmi_si_intf.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c
b/drivers/char/ipmi/ipmi_si_intf.c
index 4edfdda..96d2f9e 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2050,6 +2050,7 @@ static __devinit void try_init_dmi(struct dmi_ipmi_data
*ipmi_data)
info->si_type = SI_BT;
break;
default:
+ kfree(info);
return;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists