From: Karel Zak Date: Mon, 12 Sep 2011 13:33:04 +0000 (+0200) Subject: libmount: variable dereferenced before check [smatch scan] X-Git-Tag: v2.20.1~34 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=5ea62c4b796083a14eb4295a029b1c1ece2d7ee2;p=thirdparty%2Futil-linux.git libmount: variable dereferenced before check [smatch scan] Signed-off-by: Karel Zak --- diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c index 3d2bd00e9e..f049e42c06 100644 --- a/libmount/src/tab_update.c +++ b/libmount/src/tab_update.c @@ -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;