This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add thread safety to some environment accesses
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index dc555fb..df672f5 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -2283,10 +2283,6 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 #endif
        (s = PerlEnv_getenv("PERL5OPT")))
     {
-        /* s points to static memory in getenv(), which may be overwritten at
-         * any time; use a mortal copy instead */
-       s = SvPVX(sv_2mortal(newSVpv(s, 0)));
-
        while (isSPACE(*s))
            s++;
        if (*s == '-' && *(s+1) == 'T') {