dect
/
libnl
Archived
13
0
Fork 0

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:
Thomas Graf 2012-11-26 11:50:56 +01:00
parent 05a6723eb5
commit 4149154c22
1 changed files with 5 additions and 2 deletions

View File

@ -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));