From: Karel Zak Date: Fri, 9 Jul 2010 11:50:51 +0000 (+0200) Subject: libmount: don't return old data from optls iterator X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5283b1ce50b23be633a1fbb228dd6f85a7b34dca;p=util-linux libmount: don't return old data from optls iterator Signed-off-by: Karel Zak --- diff --git a/shlibs/mount/src/optls.c b/shlibs/mount/src/optls.c index ff2b912b..289f40d7 100644 --- a/shlibs/mount/src/optls.c +++ b/shlibs/mount/src/optls.c @@ -386,6 +386,9 @@ int mnt_optls_next_option(mnt_optls *ls, mnt_iter *itr, if (!itr || !ls || !option) return -1; + + *option = NULL; + if (!itr->head) MNT_ITER_INIT(itr, &ls->opts); while (itr->p != itr->head) {