aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTom Rini2017-09-26 22:43:45 -0400
committerTom Rini2017-10-06 11:28:22 -0400
commitfa9ca8a5d271e0533f61222df2bd6fd512687dbd (patch)
treea8a601bf10a01645aad37ee16a77ae4ad5c21209 /fs
parent3c2dff5490831f85f06aa78aad5ef537b661cecf (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4fs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 081509dbb4d..b0c7303aa41 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -167,6 +167,7 @@ int ext4fs_ls(const char *dirname)
FILETYPE_DIRECTORY);
if (status != 1) {
printf("** Can not find directory. **\n");
+ ext4fs_free_node(dirnode, &ext4fs_root->diropen);
return 1;
}