From 5e7f1b9f0a5bcff8f9ba410c17de4e822428614c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 25 Sep 2014 10:53:29 +0100 Subject: [PATCH] Don't close random file descriptor on error, from J Raynor. --- compat/forkpty-hpux.c | 2 +- compat/forkpty-sunos.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/forkpty-hpux.c b/compat/forkpty-hpux.c index 90452f8d..c72e096d 100644 --- a/compat/forkpty-hpux.c +++ b/compat/forkpty-hpux.c @@ -29,7 +29,7 @@ pid_t forkpty(int *master, char *name, struct termios *tio, struct winsize *ws) { - int slave; + int slave = -1; char *path; pid_t pid; diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c index 7b254d82..0015bf48 100644 --- a/compat/forkpty-sunos.c +++ b/compat/forkpty-sunos.c @@ -30,7 +30,7 @@ pid_t forkpty(int *master, char *name, struct termios *tio, struct winsize *ws) { - int slave; + int slave = -1; char *path; pid_t pid;