From e146082ddc57184d627f54203238aabca10e3a25 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Wed, 22 Dec 2021 21:51:55 -0500 Subject: [PATCH] ospf6d: clean coverity warning of possible null pointer Add assert to protect it. Signed-off-by: anlan_cs --- ospf6d/ospf6_abr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 5d9e315adb..663b9b7982 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -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(