From: paco Date: Wed, 13 Jun 2018 10:45:44 +0000 (+0200) Subject: bgpd: null check (Coverity 23201) X-Git-Tag: frr-6.1-dev~321^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a24729808779d8b19d0dd5515fb95ad6b42530b9;p=matthieu%2Ffrr.git bgpd: null check (Coverity 23201) Signed-off-by: F. Aragon --- 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);