summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ase.c
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-07-02 17:44:58 +0200
committerF. Aragon <paco@voltanet.io>2018-07-06 00:49:24 +0200
commit2ffc213bf847dd925483761a074accac2f9b35ba (patch)
tree56c689cec3427b1a145d7dd6c08aaa266355c0f5 /ospfd/ospf_ase.c
parentMerge pull request #2602 from pacovn/PVS-Studio_element_overflow (diff)
downloadfrr-2ffc213bf847dd925483761a074accac2f9b35ba.tar.xz
frr-2ffc213bf847dd925483761a074accac2f9b35ba.zip
ospfd pimd: null check (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ospfd/ospf_ase.c')
-rw-r--r--ospfd/ospf_ase.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index c799a4b30..d84fd26ac 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -543,7 +543,7 @@ static int ospf_ase_route_match_same(struct route_table *rt,
struct ospf_route *newor)
{
struct route_node *rn;
- struct ospf_route * or ;
+ struct ospf_route *or;
struct ospf_path *op;
struct ospf_path *newop;
struct listnode *n1;
@@ -559,6 +559,9 @@ static int ospf_ase_route_match_same(struct route_table *rt,
route_unlock_node(rn);
or = rn->info;
+
+ assert(or);
+
if (or->path_type != newor->path_type)
return 0;
@@ -577,6 +580,8 @@ static int ospf_ase_route_match_same(struct route_table *rt,
return 0;
}
+ assert(or->paths);
+
if (or->paths->count != newor->paths->count)
return 0;