diff options
-rw-r--r-- | net/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 23898f45f71..0ce12dfc7a7 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -490,6 +490,7 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) | |||
490 | struct file *file; | 490 | struct file *file; |
491 | struct socket *sock; | 491 | struct socket *sock; |
492 | 492 | ||
493 | *err = -EBADF; | ||
493 | file = fget_light(fd, fput_needed); | 494 | file = fget_light(fd, fput_needed); |
494 | if (file) { | 495 | if (file) { |
495 | sock = sock_from_file(file, err); | 496 | sock = sock_from_file(file, err); |