mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
mmc: fsl_esdhc_imx: Avoid resource leak
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>
This commit is contained in:
parent
c820d33068
commit
876f6de20a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user