mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 00:26:39 +08:00
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>
This commit is contained in:
parent
e5f0bdc784
commit
b40997b872
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user