diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2011-09-14 19:21:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-14 21:09:37 -0400 |
commit | b40997b872cdb70140f127af6069f00a86b6cf81 (patch) | |
tree | 1d7494187281b7e004fd75910a45f598cdd6d7dd | |
parent | e5f0bdc7840bdb791247cb98dfc1dab6ea6c7da4 (diff) |
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: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/um/drivers/xterm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 8ac7146c237f..2e1de5728604 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c | |||
@@ -123,6 +123,7 @@ static int xterm_open(int input, int output, int primary, void *d, | |||
123 | err = -errno; | 123 | err = -errno; |
124 | printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n", | 124 | printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n", |
125 | errno); | 125 | errno); |
126 | close(fd); | ||
126 | return err; | 127 | return err; |
127 | } | 128 | } |
128 | close(fd); | 129 | close(fd); |