projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87e60f2
)
atmel-mci: Fix memory leak in atmci_regs_show
author
Haavard Skinnemoen
<
[email protected]
>
Fri, 19 Sep 2008 19:09:28 +0000
(21:09 +0200)
committer
Pierre Ossman
<
[email protected]
>
Sat, 20 Sep 2008 10:11:48 +0000
(12:11 +0200)
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 <
[email protected]
>
Signed-off-by: Pierre Ossman <
[email protected]
>
drivers/mmc/host/atmel-mci.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/atmel-mci.c
b/drivers/mmc/host/atmel-mci.c
index 6de773d3a0cfde3d526f8dfdd2d41c9c3c7f56e9..becca914507020d412bd164dcf0286124a014782 100644
(file)
--- 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)
atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]);
atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]);
+ kfree(buf);
+
return 0;
}