Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccbca29
)
mke2fs: add proper error checking in write_reserved_inodes
author
Theodore Ts'o
<tytso@mit.edu>
Sun, 24 Jun 2018 17:54:58 +0000
(13:54 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Sun, 24 Jun 2018 17:54:58 +0000
(13:54 -0400)
Fixes-Coverity-Bug: 1369034
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c
patch
|
blob
|
history
diff --git
a/misc/mke2fs.c
b/misc/mke2fs.c
index
57b5bbf
..
ce78b7c
100644
(file)
--- a/
misc/mke2fs.c
+++ b/
misc/mke2fs.c
@@
-359,9
+359,15
@@
static void write_reserved_inodes(ext2_filsys fs)
exit(1);
}
- for (ino = 1; ino < EXT2_FIRST_INO(fs->super); ino++)
- ext2fs_write_inode_full(fs, ino, inode,
- EXT2_INODE_SIZE(fs->super));
+ for (ino = 1; ino < EXT2_FIRST_INO(fs->super); ino++) {
+ retval = ext2fs_write_inode_full(fs, ino, inode,
+ EXT2_INODE_SIZE(fs->super));
+ if (retval) {
+ com_err("ext2fs_write_inode_full", retval,
+ _("while writing reserved inodes"));
+ exit(1);
+ }
+ }
ext2fs_free_mem(&inode);
}