mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
73c21e8024
commit
80cd69203c
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue