summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 22:08:50 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 22:08:50 +0200
commitc957f7d9798d69fcb49ce6651914c481534b88aa (patch)
tree95d7ff738c328aa5b6f7f74127c4d2a92f942a6a /ospf6d
parentMerge pull request #2806 from opensourcerouting/vty-term-fd (diff)
downloadfrr-c957f7d9798d69fcb49ce6651914c481534b88aa.tar.xz
frr-c957f7d9798d69fcb49ce6651914c481534b88aa.zip
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>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_flood.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index ae26668c8..c504be09f 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -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;
}