git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c820d33
)
mmc: fsl_esdhc_imx: Avoid resource leak
author
Ye Li
<ye.li@nxp.com>
Tue, 1 Oct 2024 13:07:56 +0000
(21:07 +0800)
committer
Fabio Estevam
<festevam@gmail.com>
Fri, 4 Oct 2024 12:15:15 +0000
(09:15 -0300)
The memory of priv and plat are leaked if max_bus_width is wrong.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/fsl_esdhc_imx.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/fsl_esdhc_imx.c
b/drivers/mmc/fsl_esdhc_imx.c
index
a3defe9
..
debfc78
100644
(file)
--- a/
drivers/mmc/fsl_esdhc_imx.c
+++ b/
drivers/mmc/fsl_esdhc_imx.c
@@
-1327,6
+1327,8
@@
int fsl_esdhc_initialize(struct bd_info *bis, struct fsl_esdhc_cfg *cfg)
break;
default:
printf("invalid max bus width %u\n", cfg->max_bus_width);
+ free(plat);
+ free(priv);
return -EINVAL;
}