From: Perl 5 Porters Date: Sun, 24 Mar 1996 11:20:33 +0000 (+0000) Subject: perl 5.002_01: util.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38cd91168e939f4687d9a1275f67512d78017fa3;p=p5sagit%2Fp5-mst-13.2.git perl 5.002_01: util.c Change e_fp test to use e_tmpname, since e_fp is reset when file is lcosed in perl.c --- diff --git a/util.c b/util.c index c8cbc2b..a11d98f 100644 --- a/util.c +++ b/util.c @@ -825,10 +825,14 @@ long a1, a2, a3, a4; } fputs(message,stderr); (void)Fflush(stderr); - if (e_fp) { - fclose(e_fp); - e_fp = Nullfp; + if (e_tmpname) { + if (e_fp) { + fclose(e_fp); + e_fp = Nullfp; + } (void)UNLINK(e_tmpname); + Safefree(e_tmpname); + e_tmpname = Nullch; } statusvalue = SHIFTSTATUS(statusvalue); #ifdef VMS @@ -984,10 +988,14 @@ croak(pat, va_alist) } fputs(message,stderr); (void)Fflush(stderr); - if (e_fp) { - fclose(e_fp); - e_fp = Nullfp; + if (e_tmpname) { + if (e_fp) { + fclose(e_fp); + e_fp = Nullfp; + } (void)UNLINK(e_tmpname); + Safefree(e_tmpname); + e_tmpname = Nullch; } statusvalue = SHIFTSTATUS(statusvalue); #ifdef VMS