summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-11-25 16:37:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-11-25 16:37:29 +0000
commit8c51524e7bd4fdfb39d09396e64d52795d2775af (patch)
tree1d33041071f9735999906ed0ba8513629a4c1626 /util.c
parenta82947bcb98c52ff648baf02affb50c77a78a6b2 (diff)
downloadperl-8c51524e7bd4fdfb39d09396e64d52795d2775af.tar.gz
change#3373 introduced a handle leak in backticks and piped open()s
that fail p4raw-link: @3373 on //depot/perl: e446cec8f170ecc3eabea80092ef64589855e167 p4raw-id: //depot/perl@13260
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.c b/util.c
index 01238b865d..de84200a3e 100644
--- a/util.c
+++ b/util.c
@@ -1957,6 +1957,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
did_pipes = 0;
if (n) { /* Error */
int pid2, status;
+ PerlLIO_close(p[This]);
if (n != sizeof(int))
Perl_croak(aTHX_ "panic: kid popen errno read");
do {
@@ -2099,6 +2100,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
did_pipes = 0;
if (n) { /* Error */
int pid2, status;
+ PerlLIO_close(p[This]);
if (n != sizeof(int))
Perl_croak(aTHX_ "panic: kid popen errno read");
do {