diff options
author | Karel Zak | 2019-05-16 14:38:12 +0200 |
---|---|---|
committer | Karel Zak | 2019-05-16 14:38:12 +0200 |
commit | 778e2b2b7faeb8569e33408c3b4703adc8acb1d8 (patch) | |
tree | e4ed65a4bfeb35ef1e34ec8de85fe346e79adbd5 /misc-utils/findmnt.c | |
parent | findmnt: (verify) check mnt_table_next_fs() return code [coverity scan] (diff) | |
download | kernel-qcow2-util-linux-778e2b2b7faeb8569e33408c3b4703adc8acb1d8.tar.gz kernel-qcow2-util-linux-778e2b2b7faeb8569e33408c3b4703adc8acb1d8.tar.xz kernel-qcow2-util-linux-778e2b2b7faeb8569e33408c3b4703adc8acb1d8.zip |
findmnt: keep it easy for static analyzers
Diffstat (limited to 'misc-utils/findmnt.c')
-rw-r--r-- | misc-utils/findmnt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index eea772f0e..06db03986 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -989,7 +989,8 @@ struct libmnt_fs *get_next_fs(struct libmnt_table *tb, * findmnt [-l] <spec> [-O <options>] [-t <types>] */ again: - mnt_table_find_next_fs(tb, itr, match_func, NULL, &fs); + if (mnt_table_find_next_fs(tb, itr, match_func, NULL, &fs) != 0) + fs = NULL; if (!fs && !(flags & FL_NOSWAPMATCH) && |