aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2007-07-31 03:39:05 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:41 -0400
commit80cd69203c3ad5f2ecf7d01cec4a10ed15613682 (patch)
tree8328a64144dcf726e9b7b16c26f7fb5e10ee56a9 /drivers/char/ipmi
parent73c21e8024296760c450a0bded131cb573f83328 (diff)
ipmi: Fix mem leak in try_init_dmi()
This is only called at init time and only happens if the BIOS screws something up, so the leak is slight and it is probably not worth sending to 2.6.22.x. The driver would not initialize the interface in the case, and I have no reports of this happening. I have booted and run tests on a system with this patch. Note that the original patch was munged by the mailer, here's a new one. 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'. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ipmi')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c1
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 4edfdda0cf99..96d2f9ee42d6 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)
2050 info->si_type = SI_BT; 2050 info->si_type = SI_BT;
2051 break; 2051 break;
2052 default: 2052 default:
2053 kfree(info);
2053 return; 2054 return;
2054 } 2055 }
2055 2056