diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 20a419ee800057a4fb6ad4c66ff7bf71dff44d3a..5c57374850b306052289a8732b5a25bf8bfa9e9d 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1760,7 +1760,8 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, uns ret = 0; if (!ip6mr_new_table(net, v)) ret = -ENOMEM; - raw6_sk(sk)->ip6mr_table = v; + else + raw6_sk(sk)->ip6mr_table = v; rtnl_unlock(); return ret; }