]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Don't allocate json memory in non-json path
authorDonald Sharp <sharpd@nvidia.com>
Fri, 9 Dec 2022 13:32:12 +0000 (08:32 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 9 Dec 2022 13:38:50 +0000 (08:38 -0500)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospf6d/ospf6_interface.c

index ed228f46ae7a52c6a5e49be180bc32ef8e797e83..1c045cba079f545aecb17ffbfe9fe430c3f8a531 100644 (file)
@@ -1242,7 +1242,8 @@ static int ospf6_interface_show(struct vty *vty, struct interface *ifp,
                }
        }
 
-       json_auth = json_object_new_object();
+       if (use_json)
+               json_auth = json_object_new_object();
        if (oi->at_data.flags != 0) {
                if (use_json) {
                        if (CHECK_FLAG(oi->at_data.flags,