diff options
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 56d55fecf8ec..aa7bedf780e5 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -975,6 +975,9 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
975 | len = ipv6_getsockopt_sticky(sk, np->opt, | 975 | len = ipv6_getsockopt_sticky(sk, np->opt, |
976 | optname, optval, len); | 976 | optname, optval, len); |
977 | release_sock(sk); | 977 | release_sock(sk); |
978 | /* check if ipv6_getsockopt_sticky() returns err code */ | ||
979 | if (len < 0) | ||
980 | return len; | ||
978 | return put_user(len, optlen); | 981 | return put_user(len, optlen); |
979 | } | 982 | } |
980 | 983 | ||