]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_community_alias.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / bgpd / bgp_community_alias.c
index 431e6e00a4a04b2d01110c08f9a67271b4186aaa..1ebe7c4c8c14bd86cbb8b7c9c31ccddb89adaaad 100644 (file)
@@ -1,21 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* BGP community, large-community aliasing.
  *
  * Copyright (C) 2021 Donatas Abraitis <donatas.abraitis@gmail.com>
- *
- * This file is part of FRRouting (FRR).
- *
- * FRR 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.
- *
- * FRR 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"
@@ -81,9 +67,16 @@ void bgp_community_alias_init(void)
                            "BGP community alias (alias)");
 }
 
+static void bgp_ca_free(void *ca)
+{
+       XFREE(MTYPE_COMMUNITY_ALIAS, ca);
+}
+
 void bgp_community_alias_finish(void)
 {
+       hash_clean(bgp_ca_community_hash, bgp_ca_free);
        hash_free(bgp_ca_community_hash);
+       hash_clean(bgp_ca_alias_hash, bgp_ca_free);
        hash_free(bgp_ca_alias_hash);
 }