]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: null check (Coverity 23201) 2422/head
authorpaco <paco@voltanet.io>
Wed, 13 Jun 2018 10:45:44 +0000 (12:45 +0200)
committerpaco <paco@voltanet.io>
Thu, 14 Jun 2018 15:18:08 +0000 (17:18 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
bgpd/bgp_community.c

index 10ce1486a9590b3c79639c620b0d51d78d9e04b9..9170481769dd4fa9507d5ea0423aed3c8871f974 100644 (file)
@@ -642,16 +642,12 @@ struct community *community_str2com(const char *str)
                        community_add_val(com, val);
                        break;
                case community_token_unknown:
-               default:
                        if (com)
                                community_free(com);
                        return NULL;
                }
        } while (str);
 
-       if (!com)
-               return NULL;
-
        com_sort = community_uniq_sort(com);
        community_free(com);