Messages in this thread Patch in this message | | | From | Richard Weinberger <> | Subject | [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak | Date | Mon, 29 Aug 2011 18:13:32 +0200 |
| |
From: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
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> --- 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 8ac7146..2e1de57 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, err = -errno; printk(UM_KERN_ERR "xterm_open : unlink failed, errno = %d\n", errno); + close(fd); return err; } close(fd); -- 1.7.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |