mirror of https://github.com/vitalif/e2fsprogs
libext2fs: fix a broken close() test
Zero is a valid file descriptor, so close it. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>debian-1.42.9
parent
6a26b38ac4
commit
13b48a0ae1
|
@ -595,7 +595,7 @@ errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, int flags)
|
|||
ext2fs_mark_super_dirty(fs);
|
||||
return 0;
|
||||
errout:
|
||||
if (fd > 0)
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue