]> 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 ae26668c8ae8c199230459dd29818fcb20234726..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;
                                        }
@@ -347,7 +349,6 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
                                                        "Received is newer, remove requesting");
                                        if (req == on->last_ls_req) {
                                                ospf6_lsa_unlock(req);
-                                               req = NULL;
                                                on->last_ls_req = NULL;
                                        }
                                        if (req)