summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-03-24 11:20:33 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-03-24 11:20:33 +0000
commit38cd91168e939f4687d9a1275f67512d78017fa3 (patch)
tree4066ae8b7cfd01db0a08dcb8b738865b24419e73 /util.c
parentbef10a86a57eda3140922972782e9a32409f68cc (diff)
downloadperl-38cd91168e939f4687d9a1275f67512d78017fa3.tar.gz
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
Diffstat (limited to 'util.c')
-rw-r--r--util.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/util.c b/util.c
index c8cbc2ba54..a11d98fe61 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