static struct hash *cluster_hash;
-struct attr_extra *bgp_attr_extra_alloc(void)
-{
- return XCALLOC(MTYPE_ATTR_EXTRA, sizeof(struct attr_extra));
-}
-
-void bgp_attr_extra_free(struct attr *attr)
-{
- XFREE(MTYPE_ATTR_EXTRA, attr->extra);
-}
-
static void *cluster_hash_alloc(void *p)
{
const struct cluster_list *val = (const struct cluster_list *)p;
*/
static void attr_vfree(void *attr)
{
- bgp_attr_extra_free(attr);
XFREE(MTYPE_ATTR, attr);
}
struct lcommunity *lcomm = NULL;
/* aspath refcount shoud be decrement. */
- if (attr->aspath)
- aspath_unintern(&attr->aspath);
+ aspath_unintern(&attr->aspath);
UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AS_PATH));
if (attr->community)
bgp_attr_set_vnc_subtlvs(attr, NULL);
}
#endif
- bgp_attr_extra_free(attr);
}
/* Implement draft-scudder-idr-optional-transitive behaviour and
* we can chuck as4_aggregator and as4_path alltogether in order
* to save memory
*/
- if (as4_path) {
- /*
- * unintern - it is in the hash
- * The flag that we got this is still there, but that
- * does not do any trouble
- */
- aspath_unintern(&as4_path);
- }
+ /*
+ * unintern - it is in the hash
+ * The flag that we got this is still there, but that
+ * does not do any trouble
+ */
+ aspath_unintern(&as4_path);
transit = bgp_attr_get_transit(attr);
if (ret != BGP_ATTR_PARSE_ERROR) {