All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] erofs-utils: fsck: fix fd leak on failure in erofs_extract_file()
@ 2024-08-02  1:55 Gao Xiang
  2024-08-02  1:55 ` [PATCH 2/3] erofs-utils: lib: fix out-of-bounds in erofs_io_xcopy() Gao Xiang
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Gao Xiang @ 2024-08-02  1:55 UTC (permalink / raw)
  To: linux-erofs; +Cc: Gao Xiang

Ignore the return values as other close()s instead.

Coverity-id: 502331
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
 fsck/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fsck/main.c b/fsck/main.c
index fb66967..bbef645 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -702,11 +702,9 @@ again:
 
 	/* verify data chunk layout */
 	ret = erofs_verify_inode_data(inode, fd);
+	close(fd);
 	if (ret)
 		return ret;
-
-	if (close(fd))
-		return -errno;
 	return ret;
 }
 
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-04  1:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-02  1:55 [PATCH 1/3] erofs-utils: fsck: fix fd leak on failure in erofs_extract_file() Gao Xiang
2024-08-02  1:55 ` [PATCH 2/3] erofs-utils: lib: fix out-of-bounds in erofs_io_xcopy() Gao Xiang
2024-08-02 21:19   ` Sandeep Dhavale via Linux-erofs
2024-08-02  1:55 ` [PATCH 3/3] erofs-utils: lib: fix fd leak on failure in erofs_dev_open() Gao Xiang
2024-08-02 21:21   ` Sandeep Dhavale via Linux-erofs
2024-08-02  6:23 ` [PATCH 4/3] erofs-utils: lib: fix potential memory leak in erofs_export_xattr_ibody() Gao Xiang
2024-08-02 21:22   ` Sandeep Dhavale via Linux-erofs
2024-08-02 21:17 ` [PATCH 1/3] erofs-utils: fsck: fix fd leak on failure in erofs_extract_file() Sandeep Dhavale via Linux-erofs
2024-08-04  1:47   ` Gao Xiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.