summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-07-09 00:27:51 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-07-17 17:54:01 +0000
commit2f96c7027cf9ba783b07d2fd9195877ecc1a4b55 (patch)
treec425a5e9efdea5d041c349df04bf565f21fd2448
parent431613ddf056b228a6eff5370d76e0753ca33da6 (diff)
downloadperl-2f96c7027cf9ba783b07d2fd9195877ecc1a4b55.tar.gz
File descriptor leak in do_exec3
Message-Id: <199907090827.EAA03321@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@3678
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 1ed48d2436..f4857cf04f 100644
--- a/util.c
+++ b/util.c
@@ -2304,10 +2304,11 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
break;
n += n1;
}
+ PerlLIO_close(pp[0]);
+ did_pipes = 0;
if (n) { /* Error */
if (n != sizeof(int))
Perl_croak(aTHX_ "panic: kid popen errno read");
- PerlLIO_close(pp[0]);
errno = errkid; /* Propagate errno from kid */
return Nullfp;
}