mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 12:44:23 +08:00
fat: FAT filesystem premature release of info struct.
File was found on specified location. Info about file was read, but then immediately destroyed using 'free' call. As a result file size was set to 0, hence fat process didn't read any data. Premature 'free' call removed. Resources are freed right before function return. File is read correctly. Signed-off-by: Martin Vystrcil <martin.vystrcil@m-linux.cz>
This commit is contained in:
parent
bd98e6ae71
commit
d7af2a8630
@ -1174,10 +1174,6 @@ int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
|
||||
/* For saving default max clustersize memory allocated to malloc pool */
|
||||
dir_entry *dentptr = itr->dent;
|
||||
|
||||
free(itr);
|
||||
|
||||
itr = NULL;
|
||||
|
||||
ret = get_contents(&fsdata, dentptr, pos, buffer, maxsize, actread);
|
||||
|
||||
out_free_both:
|
||||
|
Loading…
Reference in New Issue
Block a user