Skip to content
Permalink
Browse files

Merge pull request #2605 from pacovn/PVS-Studio_null_check

ospfd  pimd: null check (PVS-Studio)
  • Loading branch information...
Jafaral committed Jul 6, 2018
2 parents 32ec4bc + 2ffc213 commit 8c469c83bcd772b138172d7d7472e54e62c73920
Showing with 7 additions and 2 deletions.
  1. +6 −1 ospfd/ospf_ase.c
  2. +1 −1 pimd/pim_mroute.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;

@@ -158,7 +158,7 @@ static int pim_mroute_msg_nocache(int fd, struct interface *ifp,
* the Interface type is SSM we don't need to
* do anything here
*/
if ((pim_rpf_addr_is_inaddr_none(rpg)) || (!pim_ifp)
if (!rpg || (pim_rpf_addr_is_inaddr_none(rpg))
|| (!(PIM_I_am_DR(pim_ifp)))) {
if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug(

0 comments on commit 8c469c8

Please sign in to comment.
You can’t perform that action at this time.