diff mbox series

[v2,14/28] fs/squashfs: sqfs_read: remove useless sqfs_closedir()

Message ID 20201103111126.23600-15-richard.genoud@posteo.net
State Accepted
Commit b34949fe9baaae49003b2981213495bab3afef9b
Delegated to: Tom Rini
Headers show
Series fs/squashfs: fix memory leaks and introduce exists() function | expand

Commit Message

Richard Genoud Nov. 3, 2020, 11:11 a.m. UTC
as sqfs_opendir failed, there's no need to call sqfs_closedir

Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
---
 fs/squashfs/sqfs.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Tom Rini Nov. 20, 2020, 1:37 a.m. UTC | #1
On Tue, Nov 03, 2020 at 12:11:12PM +0100, Richard Genoud wrote:

> as sqfs_opendir failed, there's no need to call sqfs_closedir
> 
> Signed-off-by: Richard Genoud <richard.genoud@posteo.net>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
index 13e64bea934..1ac07625889 100644
--- a/fs/squashfs/sqfs.c
+++ b/fs/squashfs/sqfs.c
@@ -1323,7 +1323,6 @@  int sqfs_read(const char *filename, void *buf, loff_t offset, loff_t len,
 	sqfs_split_path(&file, &dir, filename);
 	ret = sqfs_opendir(dir, &dirsp);
 	if (ret) {
-		sqfs_closedir(dirsp);
 		goto free_paths;
 	}