Unicode data updated to be the latest beta of the Unicode 3.0.
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index 9127137..19479db 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -828,7 +828,12 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
     }
     FreeEnvironmentStrings(envv);
 #  else
-#    ifndef PERL_USE_SAFE_PUTENV
+#    ifdef CYGWIN
+    I32 i;
+    for (i = 0; environ[i]; i++)
+       Safefree(environ[i]);
+#    else
+#      ifndef PERL_USE_SAFE_PUTENV
     I32 i;
 
     if (environ == PL_origenviron)
@@ -836,7 +841,8 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
     else
        for (i = 0; environ[i]; i++)
            safesysfree(environ[i]);
-#    endif /* PERL_USE_SAFE_PUTENV */
+#      endif /* PERL_USE_SAFE_PUTENV */
+#    endif /* CYGWIN */
 
     environ[0] = Nullch;