summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-14 13:03:50 -0400
committerGitHub <noreply@github.com>2018-06-14 13:03:50 -0400
commit259952c503e6a19c82931d9e81b65a60c6354564 (patch)
tree71dd7000e9e87e94feb0344a250d15620987b061
parent0d0ca0bb3462efc19d1f2e6d770413f78b022e74 (diff)
parenta24729808779d8b19d0dd5515fb95ad6b42530b9 (diff)
Merge pull request #2422 from pacovn/Coverity_23201_Dereference_before_null_check
bgpd: null check (Coverity 23201)
-rw-r--r--bgpd/bgp_community.c4
1 files changed, 0 insertions, 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);