Merge pull request #9549 from mobash-rasool/ospfv2-bug-fixes-02

ospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common.
This commit is contained in:
Igor Ryzhov 2021-09-03 17:28:59 +03:00 committed by GitHub
commit 038307d88d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4682,7 +4682,6 @@ static int show_ip_ospf_neighbor_all_common(struct vty *vty, struct ospf *ospf,
json_vrf = json_object_new_object();
else
json_vrf = json;
json_neighbor_sub = json_object_new_object();
}
ospf_show_vrf_name(ospf, vty, json_vrf, use_vrf);
@ -4708,6 +4707,8 @@ static int show_ip_ospf_neighbor_all_common(struct vty *vty, struct ospf *ospf,
if (nbr_nbma->nbr == NULL
|| nbr_nbma->nbr->state == NSM_Down) {
if (use_json) {
json_neighbor_sub =
json_object_new_object();
json_object_int_add(json_neighbor_sub,
"nbrNbmaPriority",
nbr_nbma->priority);