Commit b40997b8 authored by Jonathan Neuschäfer's avatar Jonathan Neuschäfer Committed by Linus Torvalds

um: drivers/xterm.c: fix a file descriptor leak

I could use out_close1, but that seems to be the code path to close the fd
returned by os_create_unix_socket, and using it to close the fd returned
by mkstemp might lead to some confusion, so I don't do it.
Signed-off-by: default avatarJonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e5f0bdc7
...@@ -123,6 +123,7 @@ static int xterm_open(int input, int output, int primary, void *d, ...@@ -123,6 +123,7 @@ static int xterm_open(int input, int output, int primary, void *d,
err = -errno; err = -errno;
printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n", printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n",
errno); errno);
close(fd);
return err; return err;
} }
close(fd); close(fd);
......
Markdown is supported
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