mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
Fix memory leak in mmc_read()
There is be a path through mmc_read in drivers/mmc/mmc.c where malloc'd memory is not freed before exiting mmc_read: it occurs if mmc_set_blocklen() returns a non-zero value. Reported-by: Quentin Armitage <Quentin@Armitage.org.uk> Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
6258b04e9a
commit
8c4444ff5e
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size)
|
|||
err = mmc_set_blocklen(mmc, mmc->read_bl_len);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
goto free_buffer;
|
||||
|
||||
for (i = startblock; i <= endblock; i++) {
|
||||
int segment_size;
|
||||
|
|
Loading…
Add table
Reference in a new issue