diff options
| author | Mark Stapp <mjs@labn.net> | 2023-06-30 09:44:00 -0400 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-07-02 19:40:56 +0000 |
| commit | 93a3c738c855a5d0b59d86b4598297f6775a2e5d (patch) | |
| tree | 16c062d8abf1376cf4f05664f9436d8aa2b43661 | |
| parent | 26e22ff7e59122c180b03b15894cd460e206333b (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>
(cherry picked from commit 864a3bc1855ec8027fec8d6f400adb44e1ecbfcf)
| -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 51cd2a127b..89ad0ba23c 100644 --- a/ospfd/ospf_ldp_sync.c +++ b/ospfd/ospf_ldp_sync.c @@ -651,6 +651,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(); @@ -686,6 +689,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 cdfc546608..660933bd86 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -4094,6 +4094,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(); |
