diff options
Diffstat (limited to 'lib/nexthop_group.c')
| -rw-r--r-- | lib/nexthop_group.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 4575ad6f70..7b3fb15625 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -185,9 +185,7 @@ void copy_nexthops(struct nexthop **tnh, const struct nexthop *nh, const struct nexthop *nh1; for (nh1 = nh; nh1; nh1 = nh1->next) { - nexthop = nexthop_new(); - nexthop_copy(nexthop, nh1, rparent); - + nexthop = nexthop_dup(nh1, rparent); nexthop_add(tnh, nexthop); if (CHECK_FLAG(nh1->flags, NEXTHOP_FLAG_RECURSIVE)) |
