diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 20:08:50 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 20:08:50 +0000 | 
| commit | c957f7d9798d69fcb49ce6651914c481534b88aa (patch) | |
| tree | 95d7ff738c328aa5b6f7f74127c4d2a92f942a6a /ospf6d/ospf6_flood.c | |
| parent | 7a07a176cf30db569f2a4cf37a7ad8fdf9af6516 (diff) | |
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/ospf6_flood.c')
| -rw-r--r-- | ospf6d/ospf6_flood.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index ae26668c8a..c504be09fd 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;  					}  | 
