Change 29574 by [EMAIL PROTECTED] on 2006/12/18 09:51:09
Subject: [PATCH] perl.c: leak avoidance
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Sat, 16 Dec 2006 11:48:13 -0500
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/perl.c#771 edit
Differences ...
==== //depot/perl/perl.c#771 (text) ====
Index: perl/perl.c
--- perl/perl.c#770~29422~ 2006-11-29 20:24:10.000000000 -0800
+++ perl/perl.c 2006-12-18 01:51:09.000000000 -0800
@@ -792,19 +792,6 @@
PL_exitlist = NULL;
PL_exitlistlen = 0;
- if (destruct_level == 0){
-
- DEBUG_P(debprofdump());
-
-#if defined(PERLIO_LAYERS)
- /* No more IO - including error messages ! */
- PerlIO_cleanup(aTHX);
-#endif
-
- /* The exit() function will do everything that needs doing. */
- return STATUS_EXIT;
- }
-
/* jettison our possibly duplicated environment */
/* if PERL_USE_SAFE_PUTENV is defined environ will not have been copied
* so we certainly shouldn't free it here
@@ -831,6 +818,22 @@
#endif
#endif /* !PERL_MICRO */
+ if (destruct_level == 0) {
+
+ DEBUG_P(debprofdump());
+
+#if defined(PERLIO_LAYERS)
+ /* No more IO - including error messages ! */
+ PerlIO_cleanup(aTHX);
+#endif
+
+ CopFILE_free(&PL_compiling);
+ CopSTASH_free(&PL_compiling);
+
+ /* The exit() function will do everything that needs doing. */
+ return STATUS_EXIT;
+ }
+
/* reset so print() ends up where we expect */
setdefout(NULL);
End of Patch.