]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: Don't allocate json memory unless we have json output 9578/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 7 Sep 2021 14:10:50 +0000 (10:10 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 7 Sep 2021 14:10:50 +0000 (10:10 -0400)
commit19d37e54a010c38b18f6a3e8b577b6b016ce5a6b
treed5ae2b79fcaad00e8b5a3a7e21bc7683a7404c75
parent192422ef3b2e0bc533a25ca276f22f36a14265ef
ospfd: Don't allocate json memory unless we have json output

Several functions in ospf_vty.c were allocating json memory
irrelevant if it was needed or not and then at the end of the loop
free'ing it if it was not used.  Clean up the access pattern.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd/ospf_vty.c