Merge pull request #3418 from pguibert6WIND/bgp_rfapi_path_info_extra_free

bgpd: reuse bgp_path_info_extra_free() routing in rfapi
This commit is contained in:
Lou Berger 2018-12-05 10:24:33 -05:00 committed by GitHub
commit 60e2b4f566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -176,7 +176,7 @@ static struct bgp_path_info_extra *bgp_path_info_extra_new(void)
return new;
}
static void bgp_path_info_extra_free(struct bgp_path_info_extra **extra)
void bgp_path_info_extra_free(struct bgp_path_info_extra **extra)
{
struct bgp_path_info_extra *e;

View File

@ -362,6 +362,7 @@ extern struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
extern struct bgp_path_info *bgp_path_info_lock(struct bgp_path_info *path);
extern struct bgp_path_info *bgp_path_info_unlock(struct bgp_path_info *path);
extern void bgp_path_info_add(struct bgp_node *rn, struct bgp_path_info *pi);
extern void bgp_path_info_extra_free(struct bgp_path_info_extra **extra);
extern void bgp_path_info_reap(struct bgp_node *rn, struct bgp_path_info *pi);
extern void bgp_path_info_delete(struct bgp_node *rn, struct bgp_path_info *pi);
extern struct bgp_path_info_extra *

View File

@ -550,11 +550,8 @@ static void rfapiBgpInfoFree(struct bgp_path_info *goner)
if (goner->attr) {
bgp_attr_unintern(&goner->attr);
}
if (goner->extra) {
assert(!goner->extra->damp_info); /* Not used in import tbls */
XFREE(MTYPE_BGP_ROUTE_EXTRA, goner->extra);
goner->extra = NULL;
}
if (goner->extra)
bgp_path_info_extra_free(&goner->extra);
XFREE(MTYPE_BGP_ROUTE, goner);
}