diff options
| author | Russ White <russ@riw.us> | 2018-06-29 18:12:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-29 18:12:48 -0400 |
| commit | 6f7f19c4cf27e5e65aa29b75dca7365510b499c5 (patch) | |
| tree | 028190e3ac9bbf24090fec3f5840dab3eeda0d3e | |
| parent | bced989bf0d2e642e077d0fe5bad247adfd7717e (diff) | |
| parent | 1230a82d5b3165a200ee8b6742149e06f84aad58 (diff) | |
Merge pull request #2588 from pacovn/Clang_dereference1
bgpd isisd: null check (Clang scan)
| -rw-r--r-- | bgpd/bgp_evpn.c | 2 | ||||
| -rw-r--r-- | isisd/isis_spf.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 0557bbcce9..480c7bc63a 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -4243,7 +4243,7 @@ void bgp_evpn_unconfigure_import_rt_for_vrf(struct bgp *bgp_vrf, list_delete_node(bgp_vrf->vrf_import_rtl, node_to_del); /* fallback to auto import rt, if this was the last RT */ - if (list_isempty(bgp_vrf->vrf_import_rtl)) { + if (bgp_vrf->vrf_import_rtl && list_isempty(bgp_vrf->vrf_import_rtl)) { UNSET_FLAG(bgp_vrf->vrf_flags, BGP_VRF_IMPORT_RT_CFGD); evpn_auto_rt_import_add_for_vrf(bgp_vrf); } diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 2e2933db33..556f2890cf 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1473,8 +1473,9 @@ static void isis_print_paths(struct vty *vty, struct isis_vertex_queue *queue, vty_out(vty, "%-20s %-12s %-6u ", vid2string(vertex, buff, sizeof(buff)), vtype2string(vertex->type), vertex->d_N); - for (unsigned int i = 0; i < MAX(listcount(vertex->Adj_N), - listcount(vertex->parents)); + for (unsigned int i = 0; + i < MAX(vertex->Adj_N ? listcount(vertex->Adj_N) : 0, + vertex->parents ? listcount(vertex->parents) : 0); i++) { if (anode) { adj = listgetdata(anode); |
