mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 17:13:46 +00:00
Merge pull request #9458 from anlancs/fix-ospf6-null
ospf6d: fix lock leak of using ALL_LSDB in GR helper
This commit is contained in:
commit
5809c297fb
@ -233,9 +233,14 @@ 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;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ extern struct ospf6_lsa *ospf6_lsdb_next(const struct route_node *iterend,
|
||||
|
||||
/*
|
||||
* Since we are locking the lsa in ospf6_lsdb_head
|
||||
* and then unlocking it in lspf6_lsa_lock, when
|
||||
* and then unlocking it in ospf6_lsa_unlock, when
|
||||
* we cache the next pointer we need to increment
|
||||
* the lock for the lsa so we don't accidently free
|
||||
* it really early.
|
||||
|
Loading…
Reference in New Issue
Block a user