]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_interface.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / ospf6d / ospf6_interface.c
index ed228f46ae7a52c6a5e49be180bc32ef8e797e83..7a22fdf0641f96cd41524ba3a33f1fee567d3793 100644 (file)
@@ -1,21 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2003 Yasuhiro Ohara
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
@@ -303,6 +288,9 @@ void ospf6_interface_delete(struct ospf6_interface *oi)
        /* disable from area list if possible */
        ospf6_area_interface_delete(oi);
 
+       if (oi->at_data.auth_key)
+               XFREE(MTYPE_OSPF6_AUTH_MANUAL_KEY, oi->at_data.auth_key);
+
        /* Free BFD allocated data. */
        XFREE(MTYPE_TMP, oi->bfd_config.profile);
 
@@ -1242,7 +1230,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,