From: Richard Weinberger <richard@nod.at>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Richard Weinberger" <richard@nod.at>
Subject: [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak
Date: Mon, 29 Aug 2011 18:03:55 +0200 [thread overview]
Message-ID: <1314633842-24515-3-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1314633842-24515-1-git-send-email-richard@nod.at>
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
next prev parent reply other threads:[~2011-08-29 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-29 16:03 UML fixes for 3.1-rcX Richard Weinberger
2011-08-29 16:03 ` [PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build Richard Weinberger
2011-08-29 16:03 ` Richard Weinberger [this message]
2011-08-29 16:03 ` [PATCH 3/9] um: Save FPU registers between task switches Richard Weinberger
2011-08-29 16:03 ` [PATCH 4/9] um: fix oopsable race in line_close() Richard Weinberger
2011-08-29 16:03 ` [PATCH 5/9] um: winch_interrupt() can happen inside of free_winch() Richard Weinberger
2011-08-29 16:03 ` [PATCH 6/9] um: fix free_winch() mess Richard Weinberger
2011-08-29 16:04 ` [PATCH 7/9] um: PTRACE_[GS]ETFPXREGS had been wired on the wrong subarch Richard Weinberger
2011-08-29 16:13 UML fixes for 3.1-rcX (2nd try) Richard Weinberger
2011-08-29 16:13 ` [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314633842-24515-3-git-send-email-richard@nod.at \
--to=richard@nod.at \
--cc=akpm@linux-foundation.org \
--cc=j.neuschaefer@gmx.net \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®