]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: variable dereferenced before check [smatch scan]
authorKarel Zak <kzak@redhat.com>
Mon, 12 Sep 2011 13:33:04 +0000 (15:33 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Sep 2011 13:33:04 +0000 (15:33 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/tab_update.c

index 3d2bd00e9e0e944e6c5bcb126ffd1a348827ae72..f049e42c06a34d3a4968aad229c51cd55c30e82b 100644 (file)
@@ -718,7 +718,7 @@ int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc)
 
        assert(upd);
 
-       if (!upd->filename || !upd)
+       if (!upd || !upd->filename)
                return -EINVAL;
        if (!upd->ready)
                return 0;