summaryrefslogtreecommitdiff
path: root/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache.c')
-rw-r--r--lib/cache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cache.c b/lib/cache.c
index 415e471..8ba3d5b 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -829,7 +829,9 @@ restart:
goto restart;
else if (err < 0)
goto errout;
- grp++;
+
+ if (grp)
+ grp++;
} while (grp && grp->ag_group &&
(cache->c_flags & NL_CACHE_AF_ITER));
@@ -935,7 +937,8 @@ restart:
} else if (err < 0)
break;
- grp++;
+ if (grp)
+ grp++;
} while (grp && grp->ag_group &&
(cache->c_flags & NL_CACHE_AF_ITER));