summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/unix/af_unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index e3f85bc8b135..9da8e3c68833 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1041,6 +1041,8 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
umode_t mode = S_IFSOCK |
(SOCK_INODE(sock)->i_mode & ~current_umask());
err = unix_mknod(dentry, &path, mode, &u_path);
+ path.dentry = NULL;
+ path.mnt = NULL;
if (err) {
if (err == -EEXIST)
err = -EADDRINUSE;