Commit a09f4855 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

drivers/char/ipmi/ipmi_si_intf.c:default_find_bmc(): fix leak

If check_legacy_ioport() returns true, we leak *info.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11362Reported-by: default avatarDaniel Marjamki <danielm77@spray.se>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Corey Minyard <minyard@acm.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 27aa069a
...@@ -2695,15 +2695,13 @@ static __devinit void default_find_bmc(void) ...@@ -2695,15 +2695,13 @@ static __devinit void default_find_bmc(void)
for (i = 0; ; i++) { for (i = 0; ; i++) {
if (!ipmi_defaults[i].port) if (!ipmi_defaults[i].port)
break; break;
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return;
#ifdef CONFIG_PPC_MERGE #ifdef CONFIG_PPC_MERGE
if (check_legacy_ioport(ipmi_defaults[i].port)) if (check_legacy_ioport(ipmi_defaults[i].port))
continue; continue;
#endif #endif
info = kzalloc(sizeof(*info), GFP_KERNEL);
if (!info)
return;
info->addr_source = NULL; info->addr_source = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment