attr->community = NULL;
/* See the longer comment down below. */
if (old && old->refcnt == 0)
- community_free(old);
+ community_free(&old);
return RMAP_OKAY;
}
merge = community_merge(community_dup(old), rcs->com);
new = community_uniq_sort(merge);
- community_free(merge);
+ community_free(&merge);
} else
new = community_dup(rcs->com);
* Really need to cleanup attribute caching sometime.
*/
if (old && old->refcnt == 0)
- community_free(old);
+ community_free(&old);
/* will be interned by caller if required */
attr->community = new;
struct rmap_com_set *rcs = rule;
if (rcs->com)
- community_free(rcs->com);
+ community_free(&rcs->com);
XFREE(MTYPE_ROUTE_MAP_COMPILED, rcs);
}
merge = community_list_match_delete(community_dup(old),
list);
new = community_uniq_sort(merge);
- community_free(merge);
+ community_free(&merge);
/* HACK: if the old community is not intern'd,
* we should free it here, or all reference to it may be
* Really need to cleanup attribute caching sometime.
*/
if (old->refcnt == 0)
- community_free(old);
+ community_free(&old);
if (new->size == 0) {
path->attr->community = NULL;
path->attr->flag &=
~ATTR_FLAG_BIT(BGP_ATTR_COMMUNITIES);
- community_free(new);
+ community_free(&new);
} else {
path->attr->community = new;
path->attr->flag |=
ret = generic_set_add(vty, VTY_GET_CONTEXT(route_map_index),
"community", str);
- community_free(com);
+ community_free(&com);
return ret;
}