aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-09-19 15:09:28 -0400
committerPierre Ossman <drzeus@drzeus.cx>2008-09-20 06:11:48 -0400
commitb17339a12c279d73869c74a37642035cd2f896f8 (patch)
tree109ceb368815465b8ac332ba23aae3aee5c99a86 /drivers/mmc
parent87e60f2b80202575a23fa1bf56c6eb3b419c480a (diff)
atmel-mci: Fix memory leak in atmci_regs_show
The debugfs hook atmci_regs_show allocates a temporary buffer for storing a register snapshot, but it doesn't free it before returning. Plug this leak. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/atmel-mci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 6de773d3a0cf..becca9145070 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -218,6 +218,8 @@ static int atmci_regs_show(struct seq_file *s, void *v)
218 atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]); 218 atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]);
219 atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]); 219 atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]);
220 220
221 kfree(buf);
222
221 return 0; 223 return 0;
222} 224}
223 225