Skip to content
Snippets Groups Projects
Commit fa9ca8a5 authored by Tom Rini's avatar Tom Rini
Browse files

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: default avatarTom Rini <trini@konsulko.com>
parent 3c2dff54
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment