]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: clean coverity warning of possible null pointer 10259/head
authoranlan_cs <anlan_cs@tom.com>
Thu, 23 Dec 2021 02:51:55 +0000 (21:51 -0500)
committeranlan_cs <anlan_cs@tom.com>
Thu, 23 Dec 2021 02:52:30 +0000 (21:52 -0500)
Add assert to protect it.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
ospf6d/ospf6_abr.c

index 5d9e315adb1d8efb27794a68586c16109c53b5ce..663b9b79821d057c7b8e4238e3ac53a86abee5b7 100644 (file)
@@ -451,6 +451,8 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route,
                /* Do not generate if area is NSSA */
                route_area =
                        ospf6_area_lookup(route->path.area_id, area->ospf6);
+               assert(route_area);
+
                if (IS_AREA_NSSA(route_area)) {
                        if (is_debug)
                                zlog_debug(