From: David S. Miller Date: Sat, 1 Apr 2006 09:00:14 +0000 (-0800) Subject: [NET]: Fix dentry leak in sys_accept(). X-Git-Tag: v2.6.17-rc1~18^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9606a21635cec077e1928273751b44ecc824a49d;p=linux-2.6 [NET]: Fix dentry leak in sys_accept(). This regression was added by commit: 39d8c1b6fbaeb8d6adec4a8c08365cc9eaca6ae4 ("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 --- diff --git a/net/socket.c b/net/socket.c index b13042f68c..bbc80780f4 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1455,7 +1455,7 @@ out_put: out: return err; out_fd: - put_filp(newfile); + fput(newfile); put_unused_fd(newfd); out_release: sock_release(newsock);