mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
ospfd: Fix possible crash and wrong data being shown
When you have more than one ospf interface configured to be used, we were attempting to reuse the json_interface_sub pointer after we added it to the json data structure. Ticket: CM-13597 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
c22767d89e
commit
70a4754dd0
@ -3967,9 +3967,14 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc,
|
||||
{
|
||||
show_ip_ospf_interface_sub (vty, ospf, ifp, json_interface_sub, use_json);
|
||||
if (use_json)
|
||||
json_object_object_add(json, ifp->name, json_interface_sub);
|
||||
{
|
||||
json_object_object_add(json, ifp->name, json_interface_sub);
|
||||
json_interface_sub = json_object_new_object ();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (use_json)
|
||||
json_object_free (json_interface_sub);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user