]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_flood.c
Merge pull request #3502 from donaldsharp/socket_to_me_baby
[mirror_frr.git] / ospf6d / ospf6_flood.c
index 6040c53dce191a9c03e5fd134afe640db738eaab..0828c2beb659348d24b47305d0ae9f8f1f87a2ac 100644 (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;
                                        }
@@ -349,8 +351,9 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
                                                ospf6_lsa_unlock(req);
                                                on->last_ls_req = NULL;
                                        }
-                                       ospf6_lsdb_remove(req,
-                                                         on->request_list);
+                                       if (req)
+                                               ospf6_lsdb_remove(req,
+                                                       on->request_list);
                                        ospf6_check_nbr_loading(on);
                                        /* fall through */
                                }