mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
87e60f2b80
commit
b17339a12c
|
@ -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 New Issue