aboutsummaryrefslogtreecommitdiff
path: root/lib/libutil/pty.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2023-08-17 13:48:42 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2023-08-17 13:48:42 +0000
commita4aaee2120ce0a121f86e39e214c2fabe82f2762 (patch)
treebbd9151ceaba5a3616e797547cc972932253ea60 /lib/libutil/pty.c
parente738085b94631f90e21a49852538ac95974baf44 (diff)
Diffstat (limited to 'lib/libutil/pty.c')
-rw-r--r--lib/libutil/pty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c
index f52407608e9a..e5b42a666c7f 100644
--- a/lib/libutil/pty.c
+++ b/lib/libutil/pty.c
@@ -95,6 +95,7 @@ forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp)
return (-1);
switch (pid = fork()) {
case -1:
+ (void)close(master);
(void)close(slave);
return (-1);
case 0: