diff options
Diffstat (limited to 'src/shared/ptyfwd.c')
-rw-r--r-- | src/shared/ptyfwd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c index a780f7de9a..31274a1418 100644 --- a/src/shared/ptyfwd.c +++ b/src/shared/ptyfwd.c @@ -293,7 +293,7 @@ static int on_sigwinch_event(sd_event_source *e, const struct signalfd_siginfo * /* The window size changed, let's forward that. */ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0) - (void)ioctl(f->master, TIOCSWINSZ, &ws); + (void) ioctl(f->master, TIOCSWINSZ, &ws); return 0; } @@ -373,6 +373,8 @@ int pty_forward_new(sd_event *event, int master, bool ignore_vhangup, PTYForward return r; r = sd_event_add_signal(f->event, &f->sigwinch_event_source, SIGWINCH, on_sigwinch_event, f); + if (r < 0) + return r; *ret = f; f = NULL; |