Skip to content

Commit

Permalink
Merge pull request #3418 from pguibert6WIND/bgp_rfapi_path_info_extra…
Browse files Browse the repository at this point in the history
…_free

bgpd: reuse bgp_path_info_extra_free() routing in rfapi
  • Loading branch information
louberger committed Dec 5, 2018
2 parents ad31e8d + a2e219f commit 60e2b4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions bgpd/bgp_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
7 changes: 2 additions & 5 deletions bgpd/rfapi/rfapi_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 60e2b4f

Please sign in to comment.