mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Pierre Ossman <[email protected]>
This commit is contained in:
parent
87e60f2b80
commit
b17339a12c
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue