diff options
-rw-r--r-- | sys/netinet6/in6_src.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 0f522b3..b2ac0df 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1018,10 +1018,10 @@ walk_addrsel_policy(callback, w) ADDRSEL_LOCK(); for (pol = TAILQ_FIRST(&addrsel_policytab); pol; pol = TAILQ_NEXT(pol, ape_entry)) { - if ((error = (*callback)(&pol->ape_policy, w)) != 0) { - ADDRSEL_UNLOCK(); + ADDRSEL_UNLOCK(); + if ((error = (*callback)(&pol->ape_policy, w)) != 0) return (error); - } + ADDRSEL_LOCK(); } ADDRSEL_UNLOCK(); |