diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2023-03-30 02:49:37 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2023-03-30 05:09:37 +0200 |
commit | f108e77a9dc9852e72215af1bf27731c48434557 (patch) | |
tree | 12816cbd6391fbfae448a1355ed89ba91168c5cd /monitor_wrap.c | |
parent | child_set_eng: verify both env pointer and count. (diff) | |
download | openssh-f108e77a9dc9852e72215af1bf27731c48434557.tar.xz openssh-f108e77a9dc9852e72215af1bf27731c48434557.zip |
upstream: Remove dead code from inside if block.
The only way the if statement can be true is if both dup()s fail, and
in that case the tmp2 can never be set. Coverity CID 291805, ok djm@
OpenBSD-Commit-ID: c0d6089b3fb725015462040cd94e23237449f0c8
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index 8e379a15c..275171168 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.126 2023/01/06 02:47:18 djm Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.127 2023/03/30 00:49:37 dtucker Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * Copyright 2002 Markus Friedl <markus@openbsd.org> @@ -577,8 +577,6 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) error_f("cannot allocate fds for pty"); if (tmp1 > 0) close(tmp1); - if (tmp2 > 0) - close(tmp2); return 0; } close(tmp1); |