]> err.no Git - util-linux/commitdiff
libmount: don't return old data from optls iterator
authorKarel Zak <kzak@redhat.com>
Fri, 9 Jul 2010 11:50:51 +0000 (13:50 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 3 Jan 2011 11:28:40 +0000 (12:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/mount/src/optls.c

index ff2b912bd201c4c9659b941e8fb1ea84573c297e..289f40d76ef9cb0b38249d0c0e3cb7c458b996d7 100644 (file)
@@ -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) {