Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46990
b: refs/heads/master
c: 4387ff7
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Feb 8, 2007
1 parent 55437cb commit b4ea80a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23bb80d2158cf4421fe239d788fd53cafb151050
refs/heads/master: 4387ff75f29412a234d394b0276c2b239d3d3844
12 changes: 8 additions & 4 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,8 +1514,9 @@ asmlinkage long sys_sendto(int fd, void __user *buff, size_t len,
struct file *sock_file;

sock_file = fget_light(fd, &fput_needed);
err = -EBADF;
if (!sock_file)
return -EBADF;
goto out;

sock = sock_from_file(sock_file, &err);
if (!sock)
Expand All @@ -1542,6 +1543,7 @@ asmlinkage long sys_sendto(int fd, void __user *buff, size_t len,

out_put:
fput_light(sock_file, fput_needed);
out:
return err;
}

Expand Down Expand Up @@ -1573,12 +1575,13 @@ asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size,
int fput_needed;

sock_file = fget_light(fd, &fput_needed);
err = -EBADF;
if (!sock_file)
return -EBADF;
goto out;

sock = sock_from_file(sock_file, &err);
if (!sock)
goto out;
goto out_put;

msg.msg_control = NULL;
msg.msg_controllen = 0;
Expand All @@ -1597,8 +1600,9 @@ asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size,
if (err2 < 0)
err = err2;
}
out:
out_put:
fput_light(sock_file, fput_needed);
out:
return err;
}

Expand Down

0 comments on commit b4ea80a

Please sign in to comment.