From a24729808779d8b19d0dd5515fb95ad6b42530b9 Mon Sep 17 00:00:00 2001 From: paco Date: Wed, 13 Jun 2018 12:45:44 +0200 Subject: [PATCH] bgpd: null check (Coverity 23201) Signed-off-by: F. Aragon --- bgpd/bgp_community.c | 4 ---- 1 file changed, 4 deletions(-) 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); -- 2.39.5