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 /ospfd/ospf_ldp_sync.c | |
| 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>
Diffstat (limited to 'ospfd/ospf_ldp_sync.c')
| -rw-r--r-- | ospfd/ospf_ldp_sync.c | 6 |
1 files changed, 6 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(); |
