cache: only continue iterating over co_groups if it is available
A co_groups == NULL must enter the loop to trigger the initial fill of the cache but may never bump the grp pointer as doing so prevents the loop from being escaped correctly. Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
parent
05a6723eb5
commit
4149154c22
1 changed files with 5 additions and 2 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue