]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #10546 from ton31337/fix/check_for_null_inside_unintern
authorRuss White <russ@riw.us>
Tue, 15 Feb 2022 17:59:45 +0000 (12:59 -0500)
committerGitHub <noreply@github.com>
Tue, 15 Feb 2022 17:59:45 +0000 (12:59 -0500)
bgpd: Check for NULL inside aspath_unintern()

1  2 
bgpd/bgp_attr.c

diff --cc bgpd/bgp_attr.c
index 4f25f2284f3aa7ce08e33644677a5b64f717e196,607e5152b5d5734d642457ce7e6e54c17e70665f..21f92c353eeca571d63e154bff86ea60ab820498
@@@ -1083,11 -1091,9 +1083,10 @@@ void bgp_attr_unintern_sub(struct attr 
        struct ecommunity *ecomm = NULL;
        struct ecommunity *ipv6_ecomm = NULL;
        struct cluster_list *cluster;
 +      struct lcommunity *lcomm = NULL;
  
        /* aspath refcount shoud be decrement. */
-       if (attr->aspath)
-               aspath_unintern(&attr->aspath);
+       aspath_unintern(&attr->aspath);
        UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AS_PATH));
  
        if (attr->community)