diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index 10ce1486a9..9170481769 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -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);