From 5283b1ce50b23be633a1fbb228dd6f85a7b34dca Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 9 Jul 2010 13:50:51 +0200 Subject: [PATCH] libmount: don't return old data from optls iterator Signed-off-by: Karel Zak --- shlibs/mount/src/optls.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.39.5