diff options
| author | Mark Stapp <mjs@labn.net> | 2023-06-30 09:44:00 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@labn.net> | 2023-06-30 13:58:16 -0400 |
| commit | 864a3bc1855ec8027fec8d6f400adb44e1ecbfcf (patch) | |
| tree | d5a84d27cd91c68aa893e3f59fd180ea5d603833 | |
| parent | 579d00e167bedfd9770cf5c1b692fa0d56f8196c (diff) | |
ospfd: check for NULLs in vty code
There were a couple of cli paths that NULL-checked in the
vtysh output path, but not in the json path.
Signed-off-by: Mark Stapp <mjs@labn.net>
| -rw-r--r-- | ospfd/ospf_ldp_sync.c | 6 | ||||
| -rw-r--r-- | ospfd/ospf_vty.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c index b97e87faa0..4aab880d22 100644 --- a/ospfd/ospf_ldp_sync.c +++ b/ospfd/ospf_ldp_sync.c @@ -637,6 +637,9 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty, rn = route_next(rn)) { oi = rn->info; + if (oi == NULL) + continue; + if (use_json) { json_interface_sub = json_object_new_object(); @@ -672,6 +675,9 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty, rn = route_next(rn)) { oi = rn->info; + if (oi == NULL) + continue; + if (use_json) json_interface_sub = json_object_new_object(); diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index ff17b147e4..74eb5c7620 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -4301,6 +4301,9 @@ static int show_ip_ospf_interface_traffic_common( rn = route_next(rn)) { oi = rn->info; + if (oi == NULL) + continue; + if (use_json) { json_interface_sub = json_object_new_object(); |
