diff options
author | Tony Cook <tony@develop-help.com> | 2016-01-06 14:27:46 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-01-06 14:27:46 +1100 |
commit | 12ffbb10fe94c82dda90efa15d691ababa5b8b8f (patch) | |
tree | ecd0dbe2ee5f5adfa7512045b909767b38b405ea /util.c | |
parent | 015aa1a8bb85e915bcad7260c8d42e63732ebce5 (diff) | |
download | perl-12ffbb10fe94c82dda90efa15d691ababa5b8b8f.tar.gz |
[perl #126240] avoid leaking memory when setting $ENV{foo} on darwin
My change in e396210 was incomplete, that change was intended to
force use of setenv()/unsetenv() on Darwin, but ended up using putenv()
instead, which is a leaky mechanism.
Added darwin to the list of many others that work better with setenv()/
unsetenv().
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2178,7 +2178,7 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val) Configure doesn't test for that yet. For Solaris, setenv() and unsetenv() were introduced in Solaris 9, so testing for HAS UNSETENV is sufficient. */ -# if defined(__CYGWIN__)|| defined(__SYMBIAN32__) || defined(__riscos__) || (defined(__sun) && defined(HAS_UNSETENV)) +# if defined(__CYGWIN__)|| defined(__SYMBIAN32__) || defined(__riscos__) || (defined(__sun) && defined(HAS_UNSETENV)) || defined(PERL_DARWIN) # if defined(HAS_UNSETENV) if (val == NULL) { (void)unsetenv(nam); |