diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-08-24 12:12:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-24 12:12:05 -0400 |
| commit | 5809c297fb56e54a0976a88f191caabb47ce7a7f (patch) | |
| tree | 53ff9de78dd8b1fbf66365df70dae6a29c28dc4c /ospf6d/ospf6_gr_helper.c | |
| parent | 5dec72e1a082c54034010d89b94092a784b75b68 (diff) | |
| parent | 37692712a531a1810a3cfd04f2a40d4b55c3e237 (diff) | |
Merge pull request #9458 from anlancs/fix-ospf6-null
ospf6d: fix lock leak of using ALL_LSDB in GR helper
Diffstat (limited to 'ospf6d/ospf6_gr_helper.c')
| -rw-r--r-- | ospf6d/ospf6_gr_helper.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c index 07e479efcb..7320ffbf0e 100644 --- a/ospf6d/ospf6_gr_helper.c +++ b/ospf6d/ospf6_gr_helper.c @@ -233,8 +233,13 @@ static bool ospf6_check_chg_in_rxmt_list(struct ospf6_neighbor *nbr) ospf6_lsdb_lookup(lsa->header->type, lsa->header->id, lsa->header->adv_router, lsa->lsdb); - if (lsa_in_db && lsa_in_db->tobe_acknowledged) + if (lsa_in_db && lsa_in_db->tobe_acknowledged) { + ospf6_lsa_unlock(lsa); + if (lsanext) + ospf6_lsa_unlock(lsanext); + return OSPF6_TRUE; + } } return OSPF6_FALSE; |
