summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authornicm <nicm>2017-01-23 10:09:43 +0000
committernicm <nicm>2017-01-23 10:09:43 +0000
commit98e7fbb2acee0238381feea5d583fc439aae08e2 (patch)
tree8962da4c7e86b1dbb64438e14a7de69a0d58ed73 /client.c
parent4ede35c48c089abe3fca0d94dbeac44b2ac442a1 (diff)
Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()). ok deraadt
Diffstat (limited to 'client.c')
-rw-r--r--client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client.c b/client.c
index 1307b0f7..90b1371c 100644
--- a/client.c
+++ b/client.c
@@ -303,6 +303,8 @@ client_main(struct event_base *base, int argc, char **argv, int flags,
fatal("pledge failed");
/* Free stuff that is not used in the client. */
+ if (ptm_fd != -1)
+ close(ptm_fd);
options_free(global_options);
options_free(global_s_options);
options_free(global_w_options);