summaryrefslogtreecommitdiff
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-03-06 15:54:44 +0100
committerGitHub <noreply@github.com>2019-03-06 15:54:44 +0100
commitd3b05897edff14ceb71c2f5603a9fcdb1ae10c83 (patch)
tree274b088939d9686c289d5de95d70cdb39a01e4b4 /bgpd/bgp_aspath.c
parentb19abe1131daa38d1d0e31c4793925bb89f11c07 (diff)
parent25af5f0d79f9e5595b1ba3bb04a0aff876471029 (diff)
Merge pull request #3869 from qlyoung/cocci-fixes
Assorted Coccinelle fixes
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 3bd3de031c..92c37fabd2 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -312,8 +312,7 @@ void aspath_free(struct aspath *aspath)
return;
if (aspath->segments)
assegment_free_all(aspath->segments);
- if (aspath->str)
- XFREE(MTYPE_AS_STR, aspath->str);
+ XFREE(MTYPE_AS_STR, aspath->str);
if (aspath->json) {
json_object_free(aspath->json);
@@ -623,8 +622,7 @@ static void aspath_make_str_count(struct aspath *as, bool make_json)
void aspath_str_update(struct aspath *as, bool make_json)
{
- if (as->str)
- XFREE(MTYPE_AS_STR, as->str);
+ XFREE(MTYPE_AS_STR, as->str);
if (as->json) {
json_object_free(as->json);