]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: (verify) check mnt_table_next_fs() return code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 16 May 2019 12:33:47 +0000 (14:33 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 16 May 2019 12:33:47 +0000 (14:33 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt-verify.c

index 1cc62def97f295412f22aad3a52c58659dea3874..132fe7fb3523c3e21676d7f0ac36cc06a9cf6124 100644 (file)
@@ -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) {