]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
findmnt: check mnt_tab_next_fs() return code [coverity scan]
authorKarel Zak <kzak@redhat.com>
Fri, 11 Mar 2011 12:23:17 +0000 (13:23 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 11 Mar 2011 12:23:17 +0000 (13:23 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c

index 97d09e2c4e3b7aa44216da28583fc7688c98a0b1..07c0eda27d25cc4f89086607c3f5e4b971bcedf5 100644 (file)
@@ -424,7 +424,8 @@ static struct libmnt_fs *get_next_fs(struct libmnt_table *tb,
                /*
                 * Print whole file
                 */
-               mnt_table_next_fs(tb, itr, &fs);
+               if (mnt_table_next_fs(tb, itr, &fs) != 0)
+                       return NULL;
 
        } else if (is_mount_compatible_mode()) {
                /*