From: Tom Rini Date: Tue, 26 Sep 2017 22:43:45 -0400 Subject: [U-Boot] [PATCH] fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls Message-ID: <1506480225-20434-1-git-send-email-trini@konsulko.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de 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=C3=BCns Signed-off-by: Tom Rini --- fs/ext4/ext4fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 081509dbb4db..b0c7303aa410 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 !=3D 1) { printf("** Can not find directory. **\n"); + ext4fs_free_node(dirnode, &ext4fs_root->diropen); return 1; } =20 --=20 1.9.1