diff options
Diffstat (limited to 'contrib/csup/lister.c')
-rw-r--r-- | contrib/csup/lister.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/csup/lister.c b/contrib/csup/lister.c index a048d25..98a9c83 100644 --- a/contrib/csup/lister.c +++ b/contrib/csup/lister.c @@ -145,6 +145,7 @@ lister_coll(struct lister *l, struct coll *coll, struct status *st) struct attrstack *as; struct statusrec *sr; struct fattr *fa; + size_t i; int depth, error, ret, prunedepth; wr = l->wr; @@ -203,7 +204,7 @@ lister_coll(struct lister *l, struct coll *coll, struct status *st) return (LISTER_ERR_WRITE); return (0); bad: - while (depth-- > 0) { + for (i = 0; i < attrstack_size(as); i++) { fa = attrstack_pop(as); fattr_free(fa); } |