diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index a5b6e559451e..45510c46c223 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -4352,11 +4352,12 @@ copy_getaddrs: | |||
4352 | err = -EFAULT; | 4352 | err = -EFAULT; |
4353 | goto error; | 4353 | goto error; |
4354 | } | 4354 | } |
4355 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) | 4355 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) { |
4356 | return -EFAULT; | 4356 | err = -EFAULT; |
4357 | goto error; | ||
4358 | } | ||
4357 | if (put_user(bytes_copied, optlen)) | 4359 | if (put_user(bytes_copied, optlen)) |
4358 | return -EFAULT; | 4360 | err = -EFAULT; |
4359 | |||
4360 | error: | 4361 | error: |
4361 | kfree(addrs); | 4362 | kfree(addrs); |
4362 | return err; | 4363 | return err; |