When show ip ospf border-routers json (without vrf)
specificed, it leads to crash if there no border-routers
information.
Fix:
Do not free json object if use_vrf flag (means vrf option
is not passed) is not set.
Ticket:#
3229017
Issue:
3229017
Testing Done:
with fix:
l1# show ip ospf border-routers json
{
}
l1# show ip ospf vrf default border-routers json
{
}
Signed-off-by: Chirag Shah <chirag@nvidia.com>
vty_out(vty, "No OSPF routing information exist\n");
else {
json_object_free(json_router);
- json_object_free(json_vrf);
+ if (use_vrf)
+ json_object_free(json_vrf);
}
return CMD_SUCCESS;
}