Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);