fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
PATCH 1/1 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 <[email protected]>
Signed-off-by Tom Rini <[email protected]>
--- fs/ext4/ext4fs.c | 1 + 1 file changed, 1 insertion(+)
fs/ext4/ext4fs.c +1 -0
@@ -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 ; }
Signature · 1 line
1.9.1
Quoted 6 lines · Tom Rini
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 <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171007/9847769f/attachment.sig>