]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 28 Jan 2022 19:11:12 +0000 (21:11 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 28 Jan 2022 19:11:12 +0000 (21:11 +0200)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_route.c

index d3bf9b6f2c84401e3485de619f71632ff8c6a63c..770578a2cd324d9c433b324d7587d7b31ea6b2a0 100644 (file)
@@ -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;