mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 06:31:28 +01:00
fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
As reported by Coverity, we did not free dirnode in the case of failure. Do so now. Reported-by: Coverity (CID: 131221) Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
3c2dff5490
commit
fa9ca8a5d2
@ -167,6 +167,7 @@ int ext4fs_ls(const char *dirname)
|
|||||||
FILETYPE_DIRECTORY);
|
FILETYPE_DIRECTORY);
|
||||||
if (status != 1) {
|
if (status != 1) {
|
||||||
printf("** Can not find directory. **\n");
|
printf("** Can not find directory. **\n");
|
||||||
|
ext4fs_free_node(dirnode, &ext4fs_root->diropen);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user