ospf6d: sanity check refcount correctness

Coverity warns about a possible double free; add an assert to make sure
we never hit it, and hopefully silence Coverity.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-08-14 20:08:50 +00:00
parent 7a07a176cf
commit c957f7d979

View File

@ -330,6 +330,8 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
zlog_debug(
"Requesting the same, remove it, next neighbor");
if (req == on->last_ls_req) {
/* sanity check refcount */
assert(req->lock >= 2);
ospf6_lsa_unlock(req);
on->last_ls_req = NULL;
}