Skip to content
Commit ce4bb04c authored by Al Viro's avatar Al Viro
Browse files

Fix a leak in socket(2) when we fail to allocate a file descriptor.



Got broken by "make sock_alloc_file() do sock_release() on failures" -
cleanup after sock_map_fd() failure got pulled all the way into
sock_alloc_file(), but it used to serve the case when sock_map_fd()
failed *before* getting to sock_alloc_file() as well, and that got
lost.  Trivial to fix, fortunately.

Fixes: 8e1611e2 (make sock_alloc_file() do sock_release() on failures)
Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 040ee692
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment