]> 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>
Mon, 18 Apr 2011 12:49:17 +0000 (14:49 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/findmnt.c

index f81a0c87fc8f162791c6cb8ed9c2fa546948142b..d1c5a48809b96302ab4549f3d12d6886f8c2b78d 100644 (file)
@@ -425,7 +425,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()) {
                /*