When doing a show command under ospf, if
not using json we would have a small memory
leak in show_ip_ospf_common.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit
50750712b1ac8364e290c67782eaf371025dc59e)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
json_object *json_areas = NULL;
if (use_json)
- json = json_object_new_object();
- json_areas = json_object_new_object();
+ {
+ json = json_object_new_object();
+ json_areas = json_object_new_object();
+ }
if (ospf->instance)
{