summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-16 14:33:47 +0200
committerKarel Zak2019-05-16 14:33:47 +0200
commit097c067f5c93e00b110a7ce345fbd5446b055fe8 (patch)
treeefb04826dd7b51ff3535d236b1affed8258ac900 /misc-utils
parentfincore: remove unused variable [clang scan] (diff)
downloadkernel-qcow2-util-linux-097c067f5c93e00b110a7ce345fbd5446b055fe8.tar.gz
kernel-qcow2-util-linux-097c067f5c93e00b110a7ce345fbd5446b055fe8.tar.xz
kernel-qcow2-util-linux-097c067f5c93e00b110a7ce345fbd5446b055fe8.zip
findmnt: (verify) check mnt_table_next_fs() return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/findmnt-verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c
index 1cc62def9..132fe7fb3 100644
--- a/misc-utils/findmnt-verify.c
+++ b/misc-utils/findmnt-verify.c
@@ -97,7 +97,9 @@ static int verify_order(struct verify_context *vfy)
/* set iterator position to 'fs' */
mnt_table_set_iter(vfy->tb, itr, vfy->fs);
- mnt_table_next_fs(vfy->tb, itr, &next);
+
+ if (mnt_table_next_fs(vfy->tb, itr, &next) != 0)
+ goto done;
/* scan all next filesystems */
while (mnt_table_next_fs(vfy->tb, itr, &next) == 0) {