From: Gurusamy Sarathy Date: Sun, 25 Nov 2001 16:37:29 +0000 (+0000) Subject: change#3373 introduced a handle leak in backticks and piped open()s X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c51524e7bd4fdfb39d09396e64d52795d2775af;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/util.c b/util.c index 01238b8..de84200 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 {