summaryrefslogtreecommitdiff
path: root/miniperlmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'miniperlmain.c')
-rw-r--r--miniperlmain.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/miniperlmain.c b/miniperlmain.c
index 71b9424fc3..c57c883f8f 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -148,6 +148,12 @@ main(int argc, char **argv, char **env)
#ifdef PERL_GLOBAL_STRUCT
free_global_struct(plvarsp);
+# ifdef PERL_GLOBAL_STRUCT_PRIVATE
+ my_plvarsp = NULL;
+ /* Remember, functions registered with atexit() can run after this point,
+ and may access "global" variables, and hence end up calling
+ Perl_GetVarsPrivate() */
+#endif
#endif /* PERL_GLOBAL_STRUCT */
exit(exitstatus);