Merge pull request #13931 from FRRouting/mergify/bp/dev/9.0/pr-13892

ospf6d: unlock lsa (backport #13892)
This commit is contained in:
Donatas Abraitis 2023-07-05 09:53:54 +03:00 committed by GitHub
commit 39ae49b02a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -293,10 +293,12 @@ static int ospf6_router_lsa_contains_adj(struct ospf6_area *area,
if (lsdesc->type != OSPF6_ROUTER_LSDESC_POINTTOPOINT)
continue;
if (lsdesc->neighbor_router_id == neighbor_router_id)
if (lsdesc->neighbor_router_id == neighbor_router_id) {
ospf6_lsa_unlock(lsa);
return RTR_LSA_ADJ_FOUND;
}
}
}
if (empty)
return RTR_LSA_MISSING;
@ -511,9 +513,11 @@ static bool ospf6_gr_check_adjs(struct ospf6 *ospf6)
for (ALL_LSDB_TYPED_ADVRTR(area->lsdb, type, router,
lsa_self)) {
found = true;
if (!ospf6_gr_check_adjs_lsa(area, lsa_self))
if (!ospf6_gr_check_adjs_lsa(area, lsa_self)) {
ospf6_lsa_unlock(lsa_self);
return false;
}
}
if (!found)
return false;
}

View File

@ -236,9 +236,11 @@ struct ospf6_lsa *ospf6_find_inter_prefix_lsa(struct ospf6 *ospf6,
prefix.prefixlen = prefix_lsa->prefix.prefix_length;
ospf6_prefix_in6_addr(&prefix.u.prefix6, prefix_lsa,
&prefix_lsa->prefix);
if (prefix_same(p, &prefix))
if (prefix_same(p, &prefix)) {
ospf6_lsa_unlock(lsa);
return lsa;
}
}
return NULL;
}