From 53d3a0a80dadfb5a329ae186321de569fe6d457e Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 28 Jan 2022 21:11:12 +0200 Subject: [PATCH] bgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info Signed-off-by: Donatas Abraitis --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index d3bf9b6f2c..770578a2cd 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6214,7 +6214,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p, new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_STATIC, 0, bgp->peer_self, attr_new, dest); SET_FLAG(new->flags, BGP_PATH_VALID); - new->extra = bgp_path_info_extra_new(); + bgp_path_info_extra_get(new); if (num_labels) { new->extra->label[0] = bgp_static->label; new->extra->num_labels = num_labels;