From: Karel Zak Date: Thu, 16 May 2019 12:38:12 +0000 (+0200) Subject: findmnt: keep it easy for static analyzers X-Git-Tag: v2.34-rc2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=778e2b2b7faeb8569e33408c3b4703adc8acb1d8;p=thirdparty%2Futil-linux.git findmnt: keep it easy for static analyzers --- diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index eea772f0e6..06db03986f 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] [-O ] [-t ] */ 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) &&