Skip to contentSkip to conversation

Series short description

PATCH In review Alan Cox 2 participants 4 messages Mar 23, 2009

Subsystems (3)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

cover Series short description

Fix up a couple of leaks that were reported ages ago and forgotten about

---

Alan Cox (2):
arm: fix leak in iop13xx/pci
arm: twl4030 - leak fix

 arch/arm/mach-iop13xx/pci.c       |    5 ++++-
 arch/arm/mach-omap2/mmc-twl4030.c |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)
Signature · 2 lines
	"That was said by Eric Raymond who belongs to another movement" 
			- Richard Stallman
author
#1 lore raw

PATCH 1/2 arm: twl4030 - leak fix

Trivial error path leak fix. Problem found by Daniel Marjamäki using cppcheck

---

 arch/arm/mach-omap2/mmc-twl4030.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/mmc-twl4030.c +1 -0
index 437f520..e1dadf7 100644
@@ -397,6 +397,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
 			break;
 		default:
 			pr_err("MMC%d configuration not supported!\n", c->mmc);
+			kfree(mmc);
 			continue;
 		}
 		hsmmc_data[c->mmc - 1] = mmc;
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] arm: twl4030 - leak fix

Quoted 4 lines · Alan Cox

Trivial error path leak fix. Problem found by Daniel Marjamäki using cppcheck

Quoted 24 lines

---

 arch/arm/mach-omap2/mmc-twl4030.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/mmc-twl4030.c +1 -1
index 437f520..e1dadf7 100644
@@ -397,6 +397,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers)
 			break;
 		default:
 			pr_err("MMC%d configuration not supported!\n", c->mmc);
+			kfree(mmc);
 			continue;
 		}
 		hsmmc_data[c->mmc - 1] = mmc;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

author
#3 lore raw

PATCH 2/2 arm: fix leak in iop13xx/pci

In reply to Alan Cox

Another leak found by Daniel Marjamäki

---

 arch/arm/mach-iop13xx/pci.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/mach-iop13xx/pci.c +4 -1
index 673b0db..4873f26 100644
@@ -1026,8 +1026,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
 		which_atu = 0;
 	}
 
-	if (!which_atu)
+	if (!which_atu) {
+		kfree(res);
 		return 0;
+	}
 
 	switch(which_atu) {
 	case IOP13XX_INIT_ATU_ATUX:
@@ -1074,6 +1076,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
 		sys->map_irq = iop13xx_pcie_map_irq;
 		break;
 	default:
+		kfree(res);
 		return 0;
 	}