diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 09:59:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 09:59:06 +0300 |
commit | db4e54aefdfe03f1aea82bb65d61f25c3ea035d7 (patch) | |
tree | 1a4b30dc2b6c8ac3173ff686b36f49dee5f0bd73 /net/ipv6/route.c | |
parent | eab61fb1cc2eeeffbceb2cf891c1b7272141af82 (diff) | |
parent | 009c9aa5be652675a06d5211e1640e02bbb1c33d (diff) | |
download | linux-db4e54aefdfe03f1aea82bb65d61f25c3ea035d7.tar.xz |
Merge tag 'v5.13-rc6' into char-misc-next
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a22822bdbf39..d417e514bd52 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3673,11 +3673,11 @@ static struct fib6_info *ip6_route_info_create(struct fib6_config *cfg, if (nh) { if (rt->fib6_src.plen) { NL_SET_ERR_MSG(extack, "Nexthops can not be used with source routing"); - goto out; + goto out_free; } if (!nexthop_get(nh)) { NL_SET_ERR_MSG(extack, "Nexthop has been deleted"); - goto out; + goto out_free; } rt->nh = nh; fib6_nh = nexthop_fib6_nh(rt->nh); @@ -3714,6 +3714,10 @@ static struct fib6_info *ip6_route_info_create(struct fib6_config *cfg, out: fib6_info_release(rt); return ERR_PTR(err); +out_free: + ip_fib_metrics_put(rt->fib6_metrics); + kfree(rt); + return ERR_PTR(err); } int ip6_route_add(struct fib6_config *cfg, gfp_t gfp_flags, |