Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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=11362

Reported-by: Daniel 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
a09f4855 27aa069a

+3 -5
+3 -5
drivers/char/ipmi/ipmi_si_intf.c
··· 2695 2695 for (i = 0; ; i++) { 2696 2696 if (!ipmi_defaults[i].port) 2697 2697 break; 2698 - 2699 - info = kzalloc(sizeof(*info), GFP_KERNEL); 2700 - if (!info) 2701 - return; 2702 - 2703 2698 #ifdef CONFIG_PPC_MERGE 2704 2699 if (check_legacy_ioport(ipmi_defaults[i].port)) 2705 2700 continue; 2706 2701 #endif 2702 + info = kzalloc(sizeof(*info), GFP_KERNEL); 2703 + if (!info) 2704 + return; 2707 2705 2708 2706 info->addr_source = NULL; 2709 2707