Coverity-id: 502356
Signed-off-by: Gao Xiang <hsiang...@linux.alibaba.com>
---
 lib/io.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/io.c b/lib/io.c
index 4937db5..6bfae69 100644
--- a/lib/io.c
+++ b/lib/io.c
@@ -258,8 +258,10 @@ repeat:
 #if defined(HAVE_SYS_STATFS_H) && defined(HAVE_FSTATFS)
                        struct statfs stfs;
 
-                       if (again)
+                       if (again) {
+                               close(fd);
                                return -ENOTEMPTY;
+                       }
 
                        /*
                         * fses like EXT4 and BTRFS will flush dirty blocks
-- 
2.43.5

Reply via email to