Skip to content

Commit

Permalink
[NET]: Fix dentry leak in sys_accept().
Browse files Browse the repository at this point in the history
This regression was added by commit:
39d8c1b
("Do not lose accepted socket when -ENFILE/-EMFILE.")

This is based upon a patch from Andi Kleen.

Thanks to Adrian Bridgett for narrowing down a good test case, and to
Andi Kleen and Andrew Morton for eyeballing this code.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 1, 2006
1 parent dbe5b4a commit 9606a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int _
out:
return err;
out_fd:
put_filp(newfile);
fput(newfile);
put_unused_fd(newfd);
out_release:
sock_release(newsock);
Expand Down

0 comments on commit 9606a21

Please sign in to comment.