From: Tom Rini Date: Wed, 27 Sep 2017 02:43:45 +0000 (-0400) Subject: fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls X-Git-Tag: v2017.11-rc2~95 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fa9ca8a;p=oweals%2Fu-boot.git 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 Signed-off-by: Tom Rini --- diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 081509dbb4..b0c7303aa4 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; }