From e93fa4daf07c393c733cd2c26b1edaa84a98be95 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Mon, 5 Feb 2024 17:11:47 +0100 Subject: [PATCH] bgpd: do not init labels in extra No need to init labels at extra allocation. num_labels is the number of set labels in label[] and is initialized to 0 by default. Signed-off-by: Louis Scalbert --- bgpd/bgp_route.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 3db883fc08..b8fdb89996 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -235,8 +235,6 @@ static struct bgp_path_info_extra *bgp_path_info_extra_new(void) struct bgp_path_info_extra *new; new = XCALLOC(MTYPE_BGP_ROUTE_EXTRA, sizeof(struct bgp_path_info_extra)); - new->label[0] = MPLS_INVALID_LABEL; - new->num_labels = 0; new->flowspec = NULL; return new; }