projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c2dff5
)
fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
author
Tom Rini
<trini@konsulko.com>
Wed, 27 Sep 2017 02:43:45 +0000
(22:43 -0400)
committer
Tom Rini
<trini@konsulko.com>
Fri, 6 Oct 2017 15:28:22 +0000
(11:28 -0400)
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>
fs/ext4/ext4fs.c
patch
|
blob
|
history
diff --git
a/fs/ext4/ext4fs.c
b/fs/ext4/ext4fs.c
index 081509dbb4db8927b6a8fa26342c39be8bb22284..b0c7303aa410034fc6091a2a56d02f75def6936a 100644
(file)
--- 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;
}